sig
type action =
Nothing
| GetMe of
(TelegramApi.User.user TelegramApi.Result.result ->
TelegramApi.Command.action)
| SendMessage of int * string * bool * int option *
TelegramApi.ReplyMarkup.reply_markup option
| ForwardMessage of int * int * bool * int
| SendChatAction of int * TelegramApi.ChatAction.action
| SendPhoto of int * string * string option * bool * int option *
TelegramApi.ReplyMarkup.reply_markup option *
(string TelegramApi.Result.result -> TelegramApi.Command.action)
| ResendPhoto of int * string * string option * bool * int option *
TelegramApi.ReplyMarkup.reply_markup option
| SendAudio of int * string * string * string * bool * int option *
TelegramApi.ReplyMarkup.reply_markup option *
(string TelegramApi.Result.result -> TelegramApi.Command.action)
| ResendAudio of int * string * string * string * bool * int option *
TelegramApi.ReplyMarkup.reply_markup option
| SendDocument of int * string * bool * int option *
TelegramApi.ReplyMarkup.reply_markup option *
(string TelegramApi.Result.result -> TelegramApi.Command.action)
| ResendDocument of int * string * bool * int option *
TelegramApi.ReplyMarkup.reply_markup option
| SendSticker of int * string * bool * int option *
TelegramApi.ReplyMarkup.reply_markup option *
(string TelegramApi.Result.result -> TelegramApi.Command.action)
| ResendSticker of int * string * bool * int option *
TelegramApi.ReplyMarkup.reply_markup option
| SendVideo of int * string * int option * string option * bool *
int option * TelegramApi.ReplyMarkup.reply_markup option *
(string TelegramApi.Result.result -> TelegramApi.Command.action)
| ResendVideo of int * string * int option * string option * bool *
int option * TelegramApi.ReplyMarkup.reply_markup option
| SendVoice of int * string * bool * int option *
TelegramApi.ReplyMarkup.reply_markup option *
(string TelegramApi.Result.result -> TelegramApi.Command.action)
| ResendVoice of int * string * bool * int option *
TelegramApi.ReplyMarkup.reply_markup option
| SendLocation of int * float * float * bool * int option *
TelegramApi.ReplyMarkup.reply_markup option
| SendVenue of int * float * float * string * string * string option *
bool * int option * TelegramApi.ReplyMarkup.reply_markup option
| SendContact of int * string * string * string option * bool *
int option * TelegramApi.ReplyMarkup.reply_markup option
| GetUserProfilePhotos of int * int option * int option *
(TelegramApi.UserProfilePhotos.user_profile_photos
TelegramApi.Result.result -> TelegramApi.Command.action)
| GetFile of string *
(TelegramApi.File.file TelegramApi.Result.result ->
TelegramApi.Command.action)
| GetFile' of string * (string option -> TelegramApi.Command.action)
| DownloadFile of TelegramApi.File.file *
(string option -> TelegramApi.Command.action)
| KickChatMember of int * int
| LeaveChat of int
| UnbanChatMember of int * int
| GetChat of int *
(TelegramApi.Chat.chat TelegramApi.Result.result ->
TelegramApi.Command.action)
| GetChatAdministrators of int *
(TelegramApi.ChatMember.chat_member list TelegramApi.Result.result ->
TelegramApi.Command.action)
| GetChatMembersCount of int *
(int TelegramApi.Result.result -> TelegramApi.Command.action)
| GetChatMember of int * int *
(TelegramApi.ChatMember.chat_member TelegramApi.Result.result ->
TelegramApi.Command.action)
| AnswerCallbackQuery of string * string option * bool
| AnswerInlineQuery of string *
TelegramApi.InlineQuery.Out.inline_query_result list * int option *
bool option * string option
| EditMessageText of
[ `ChatMessageId of string * int | `InlineMessageId of string ] *
string * TelegramApi.ParseMode.parse_mode option * bool *
TelegramApi.ReplyMarkup.reply_markup option
| EditMessageCaption of
[ `ChatMessageId of string * int | `InlineMessageId of string ] *
string * TelegramApi.ReplyMarkup.reply_markup option
| EditMessageReplyMarkup of
[ `ChatMessageId of string * int | `InlineMessageId of string ] *
TelegramApi.ReplyMarkup.reply_markup option
| GetUpdates of
(TelegramApi.Update.update list TelegramApi.Result.result ->
TelegramApi.Command.action)
| PeekUpdate of
(TelegramApi.Update.update TelegramApi.Result.result ->
TelegramApi.Command.action)
| PopUpdate of
(TelegramApi.Update.update TelegramApi.Result.result ->
TelegramApi.Command.action)
| Chain of TelegramApi.Command.action * TelegramApi.Command.action
type command = {
name : string;
description : string;
mutable enabled : bool;
run : TelegramApi.Message.message -> TelegramApi.Command.action;
}
val is_command : TelegramApi.Update.update -> bool
val read_command :
string option ->
TelegramApi.Message.message ->
TelegramApi.Command.command list -> TelegramApi.Command.action
val read_update :
string option ->
TelegramApi.Update.update ->
TelegramApi.Command.command list -> TelegramApi.Command.action
val tokenize : string -> string list
val with_auth :
command:(TelegramApi.Message.message -> TelegramApi.Command.action) ->
TelegramApi.Message.message -> TelegramApi.Command.action
end