module type BOT = sig
.. end
BOT is strictly used for customization of a TELEGRAM_BOT module. Once your customizations have been applied, pass it into Api.Mk to create
the usable TELEGRAM_BOT interface.
val token : string
The API token to use for the bot. Warning: please load this in when the bot starts or use ppx_blob to load this in at compile-time and add the blob to your .gitignore
val command_postfix : string option
An optional postfix to require after commands, usually the bots username (so /hello
val commands : TelegramApi.Command.command list
The list of commands that the bot will be able to use
val inline : TelegramApi.InlineQuery.inline_query -> TelegramApi.Command.action
The function to call on inline queries
val callback : TelegramApi.CallbackQuery.callback_query -> TelegramApi.Command.action
The function to call on callback queries
val new_chat_member : TelegramApi.Chat.chat -> TelegramApi.User.user -> TelegramApi.Command.action
Called whenever a new user is added to or joins a chat
val left_chat_member : TelegramApi.Chat.chat -> TelegramApi.User.user -> TelegramApi.Command.action
Called whenever a user leaves a chat
val new_chat_title : TelegramApi.Chat.chat -> string -> TelegramApi.Command.action
Called when the title for a chat is changed
val new_chat_photo : TelegramApi.Chat.chat ->
TelegramApi.PhotoSize.photo_size list -> TelegramApi.Command.action
Called whenever a new chat photo is set or the current one is changed
val delete_chat_photo : TelegramApi.Chat.chat -> TelegramApi.Command.action
Called whenever a chat's photo gets deleted
val group_chat_created : TelegramApi.Chat.chat -> TelegramApi.Command.action
Called whenever a chat turns into a group chat
val supergroup_chat_created : TelegramApi.Chat.chat -> TelegramApi.Command.action
Called whenever a chat turns into a supergroup chat
val channel_chat_created : TelegramApi.Chat.chat -> TelegramApi.Command.action
Called whenever a chat turns into a channel
val migrate_to_chat_id : TelegramApi.Chat.chat -> int -> TelegramApi.Command.action
Called whenever a chat migrates to a new chat id
val migrate_from_chat_id : TelegramApi.Chat.chat -> int -> TelegramApi.Command.action
Called whenever a chat has been migrated from another chat id
val pinned_message : TelegramApi.Chat.chat ->
TelegramApi.Message.message -> TelegramApi.Command.action
Called whenever a certain message is pinned for a chat