This commit is contained in:
unwind-protect 2016-08-18 04:34:24 +02:00
parent 34e7fca4bc
commit 91cb9156a0
2 changed files with 6 additions and 4 deletions

View file

@ -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)))

View file

@ -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