mirror of
https://github.com/vale981/cl-telegram-bot
synced 2025-03-05 09:41:39 -05:00
minor fixes
This commit is contained in:
parent
55fa963125
commit
3418a333f9
4 changed files with 9 additions and 7 deletions
|
@ -4,4 +4,5 @@
|
||||||
:license "MIT"
|
:license "MIT"
|
||||||
:depends-on (#:cl-json #:drakma)
|
:depends-on (#:cl-json #:drakma)
|
||||||
:serial t
|
:serial t
|
||||||
:components ((:file "cl-telegram-bot.lisp")(:file "package.lisp")))
|
:components ((:file "cl-telegram-bot.lisp")
|
||||||
|
(:file "package.lisp")))
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
; SOFTWARE.
|
; SOFTWARE.
|
||||||
|
|
||||||
(in-package :tl-bot)
|
(in-package :cl-telegram-bot)
|
||||||
|
|
||||||
(defconstant +telegram-api-uri+ "https://api.telegram.org/bot")
|
(defconstant +telegram-api-uri+ "https://api.telegram.org/bot")
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@
|
||||||
nil))
|
nil))
|
||||||
|
|
||||||
(defun decode (obj)
|
(defun decode (obj)
|
||||||
(let ((cl-json:*json-symbols-package* :tl-bot)
|
(let ((cl-json:*json-symbols-package* :cl-telegram-bot)
|
||||||
(decoded-object
|
(decoded-object
|
||||||
(json:with-decoder-simple-clos-semantics
|
(json:with-decoder-simple-clos-semantics
|
||||||
(let ((decoded-json (json:decode-json obj)))
|
(let ((decoded-json (json:decode-json obj)))
|
||||||
|
@ -98,7 +98,7 @@
|
||||||
(defun get-updates (b &key limit timeout)
|
(defun get-updates (b &key limit timeout)
|
||||||
"https://core.telegram.org/bots/api#getupdates"
|
"https://core.telegram.org/bots/api#getupdates"
|
||||||
(let* ((current-id (id b))
|
(let* ((current-id (id b))
|
||||||
(cl-json:*json-symbols-package* :tl-bot)
|
(cl-json:*json-symbols-package* :cl-telegram-bot)
|
||||||
(request
|
(request
|
||||||
(decode (make-request b "getUpdates"
|
(decode (make-request b "getUpdates"
|
||||||
(list (cons :offset current-id)
|
(list (cons :offset current-id)
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
(require 'cl-telegram-bot)
|
(require 'cl-telegram-bot)
|
||||||
|
|
||||||
(defpackage :example-bot
|
(defpackage :example-bot
|
||||||
(:use #:cl-telegram-bot))
|
(:use #:cl-telegram-bot)
|
||||||
|
(:use #:cl))
|
||||||
|
|
||||||
(in-package :example-bot)
|
(in-package :example-bot)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
(defpackage :tl-bot
|
(defpackage :cl-telegram-bot
|
||||||
(:use #:cl)
|
(:use #:cl)
|
||||||
(:nicknames :telegram-bot :tg-bot :cl-telegram-bot)
|
(:nicknames :telegram-bot :tg-bot)
|
||||||
(:size 32)
|
(:size 32)
|
||||||
(:export
|
(:export
|
||||||
#:bot
|
#:bot
|
||||||
|
|
Loading…
Add table
Reference in a new issue