(build-ctx {:keys [base-url token] :as ctx})
Builds the context.
Builds the context.
(get-chat ctx id)
Returns a channel that yields the chat info.
Returns a channel that yields the chat info.
(get-me ctx)
Return a channel that yields the info about the bot.
Return a channel that yields the info about the bot.
(get-updates {:keys [update-offset timeout] :as ctx})
(on-command ctx command cb)
(on-error ctx err)
(on-new-chat-members ctx cb)
(on-text ctx cb)
(reply-message ctx message text)
(reply-message ctx {{cid :id} :chat mid :message_id} text reply)
Utility function on top of send-message. if reply
is true
, (by
default is false
) then the message will be a reply to the given
message, otherwise it'll simply be sent to the same chat.
Utility function on top of send-message. if `reply` is `true`, (by default is `false`) then the message will be a reply to the given message, otherwise it'll simply be sent to the same chat.
(send-message ctx cid text)
(send-message ctx cid text opts)
Send a text
message to chat id cid
.
Send a `text` message to chat id `cid`.
(set-base-url ctx url)
(set-timeout ctx timeout)
(set-token ctx token)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close