package telegraml

  1. Overview
  2. Docs

Default options for a bot, if no configuration is needed. Warning: You still need to provide an API key

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@mybot will be ignored by @yourbot)

val commands : TelegramApi.Command.command list

The list of commands that the bot will be able to use

The function to call on inline queries

The function to call on callback queries

Called whenever a new user is added to or joins a chat

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

Called whenever a new chat photo is set or the current one is changed

Called whenever a chat's photo gets deleted

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

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

Called whenever a certain message is pinned for a chat