mirror of
https://github.com/vale981/cl-telegram-bot
synced 2025-03-05 09:41:39 -05:00
()
This commit is contained in:
parent
34e7fca4bc
commit
91cb9156a0
2 changed files with 6 additions and 4 deletions
|
@ -15,7 +15,7 @@
|
|||
|
||||
(let ((bot (make-bot "123456789:YOUR TOKEN HERE")))
|
||||
(loop
|
||||
(with-package :example-bot
|
||||
(with-package :example-bot
|
||||
(loop for update across (get-updates bot) do
|
||||
(let* ((message (access update 'message))
|
||||
(text (access message 'text))
|
||||
|
@ -30,7 +30,7 @@
|
|||
(when text
|
||||
(match-command "^/echo (.*)$" text
|
||||
(lambda (msg args)
|
||||
(format t (read-line (send-message bot
|
||||
(send-message bot
|
||||
chat-id
|
||||
(elt args 0))))))))))
|
||||
(elt args 0))))))))
|
||||
(sleep 1)))
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
(defpackage :cl-telegram-bot
|
||||
(:use #:cl)
|
||||
(:nicknames :telegram-bot :tg-bot)
|
||||
(:size 5)
|
||||
(:size 36)
|
||||
(:export
|
||||
#:bot
|
||||
#:make-bot
|
||||
#:with-package
|
||||
#:find-json-symbol
|
||||
#:get-slot
|
||||
#:access
|
||||
#:request-error
|
||||
#:decode
|
||||
|
|
Loading…
Add table
Reference in a new issue