module Command:sig
..end
type
action =
| |
Nothing |
| |
GetMe of |
| |
SendMessage of |
| |
ForwardMessage of |
| |
SendChatAction of |
| |
SendPhoto of |
| |
ResendPhoto of |
| |
SendAudio of |
| |
ResendAudio of |
| |
SendDocument of |
| |
ResendDocument of |
| |
SendSticker of |
| |
ResendSticker of |
| |
SendVideo of |
| |
ResendVideo of |
| |
SendVoice of |
| |
ResendVoice of |
| |
SendLocation of |
| |
SendVenue of |
| |
SendContact of |
| |
GetUserProfilePhotos of |
| |
GetFile of |
| |
GetFile' of |
| |
DownloadFile of |
| |
KickChatMember of |
| |
LeaveChat of |
| |
UnbanChatMember of |
| |
GetChat of |
| |
GetChatAdministrators of |
| |
GetChatMembersCount of |
| |
GetChatMember of |
| |
AnswerCallbackQuery of |
| |
AnswerInlineQuery of |
| |
EditMessageText of |
| |
EditMessageCaption of |
| |
EditMessageReplyMarkup of |
| |
GetUpdates of |
| |
PeekUpdate of |
| |
PopUpdate of |
| |
Chain of |
type
command = {
|
name : |
|
description : |
|
mutable enabled : |
|
run : |
name
field is the command's name (without a slash) and the description
field is the description to be used in the help message. run
is the function called when invoking the command.val is_command : TelegramApi.Update.update -> bool
val read_command : string option ->
TelegramApi.Message.message ->
command list -> action
val read_update : string option ->
TelegramApi.Update.update ->
command list -> action
val tokenize : string -> string list
val with_auth : command:(TelegramApi.Message.message -> action) ->
TelegramApi.Message.message -> action
with_auth ~command
makes a command
only run when the caller is an admin in the chat