mirror of
https://github.com/vale981/cl-telegram-bot
synced 2025-03-05 09:41:39 -05:00
fixed building with ASDF
This commit is contained in:
parent
4a4b96ee4c
commit
901c633e1c
3 changed files with 7 additions and 6 deletions
|
@ -4,5 +4,5 @@
|
|||
:license "MIT"
|
||||
:depends-on (#:cl-json #:drakma)
|
||||
:serial t
|
||||
:components ((:file "cl-telegram-bot.lisp")
|
||||
(:file "package.lisp")))
|
||||
:components ((:file "package")
|
||||
(:file "cl-telegram-bot")))
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
(in-package :cl-telegram-bot)
|
||||
|
||||
(defconstant +telegram-api-uri+ "https://api.telegram.org/bot")
|
||||
|
||||
(defclass bot ()
|
||||
((id
|
||||
|
@ -42,9 +41,9 @@
|
|||
:documentation "HTTPS endpoint"
|
||||
:initform nil)))
|
||||
|
||||
(defmethod initialize-instance :after ((b bot) &key)
|
||||
(defmethod initialize-instance :after ((b bot) &key (api-uri "https://api.telegram.org/bot"))
|
||||
(setf (endpoint b)
|
||||
(concatenate 'string +telegram-api-uri+ (token b) "/")))
|
||||
(concatenate 'string api-uri (token b) "/")))
|
||||
|
||||
(defun make-bot (token)
|
||||
"Create a new bot instance. Takes a token string."
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
(defpackage :cl-telegram-bot
|
||||
(:use #:cl)
|
||||
(:nicknames :telegram-bot :tg-bot)
|
||||
(:size 32)
|
||||
(:size 34)
|
||||
(:export
|
||||
#:bot
|
||||
#:make-bot
|
||||
#:access
|
||||
#:request-error
|
||||
#:decode
|
||||
#:get-updates
|
||||
#:set-webhook
|
||||
#:send-message
|
||||
|
|
Loading…
Add table
Reference in a new issue