module type TELEGRAM_BOT = sig
.. end
TELEGRAM_BOT represents the interface to a running bot
val url : string
The base url for all connections to the API
val commands : Api.Command.command list
A list of all commands supported by the bot
val get_me : Api.User.user Api.Result.result Lwt.t
Get the user information for the bot; use to test connection to the Telegram server
val send_message : chat_id:int -> text:string -> unit Api.Result.result Lwt.t
Send a text message to a specified chat
val send_photo : chat_id:int ->
photo:string ->
?caption:string option ->
reply_to:int option -> string Api.Result.result Lwt.t
Send a new image file (jpeg/png) to a specified chat. Note that `photo` refers to the file's name to send.
val resend_photo : chat_id:int ->
photo:string ->
?caption:string option -> reply_to:int option -> unit Api.Result.result Lwt.t
Send an existing image file (jpeg/png) to a specified chat. Note that `photo` refers to the file's id on the Telegram servers.
val send_audio : chat_id:int ->
audio:string ->
performer:string ->
title:string -> reply_to:int option -> string Api.Result.result Lwt.t
Send a new audio file (mp3) to a specified chat. Note that `audio` refers to the file's name to send.
val resend_audio : chat_id:int ->
audio:string ->
performer:string ->
title:string -> reply_to:int option -> unit Api.Result.result Lwt.t
Send an existing audio file (mp3) to a specified chat. Note that `audio` refers to the file's id on the Telegram servers.
val send_voice : chat_id:int ->
voice:string -> reply_to:int option -> string Api.Result.result Lwt.t
Send a new voice message (ogg) to a specified chat. Note that `voice` refers to the file's name to send.
val resend_voice : chat_id:int ->
voice:string -> reply_to:int option -> unit Api.Result.result Lwt.t
Send an existing voice message (ogg) to a specified chat. Note that `voice` refers to the file's id on the Telegram servers.
val get_updates : Api.Update.update list Api.Result.result Lwt.t
Get a list of all available updates that the bot has received
val peek_update : Api.Update.update Api.Result.result Lwt.t
Get the first available update from the update queue
val pop_update : ?run_cmds:bool -> unit -> Api.Update.update Api.Result.result Lwt.t
Get the first available update from the update queue and mark it as read (deletes the update)