package telegraml
Module type TelegramApi.TELEGRAM_BOTSource
TELEGRAM_BOT represents the interface to a running bot
The base url for all connections to the API
A list of all commands supported by the bot
The inline query handler for the bot
The callback query handler for the bot
Get the user information for the bot; use to test connection to the Telegram server
val send_message :
chat_id:int ->
text:string ->
parse_mode:ParseMode.parse_mode option ->
disable_web_page_preview:bool ->
?disable_notification:bool ->
reply_to:int option ->
reply_markup:ReplyMarkup.reply_markup option ->
unit Result.result Lwt.tSend a text message to a specified chat
val forward_message :
chat_id:int ->
from_chat_id:int ->
?disable_notification:bool ->
message_id:int ->
unit Result.result Lwt.tForwards any message from one chat to another (can be same chat)
Send an action report to the chat, to show that a command will take some time
val send_photo :
chat_id:int ->
photo:string ->
?caption:string option ->
?disable_notification:bool ->
reply_to:int option ->
reply_markup:ReplyMarkup.reply_markup option ->
string Result.result Lwt.tSend 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 ->
?disable_notification:bool ->
reply_to:int option ->
reply_markup:ReplyMarkup.reply_markup option ->
unit Result.result Lwt.tSend 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 ->
?disable_notification:bool ->
reply_to:int option ->
reply_markup:ReplyMarkup.reply_markup option ->
string Result.result Lwt.tSend 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 ->
?disable_notification:bool ->
reply_to:int option ->
reply_markup:ReplyMarkup.reply_markup option ->
unit Result.result Lwt.tSend an existing audio file (mp3) to a specified chat. Note that audio refers to the file's id on the Telegram servers.
val send_document :
chat_id:int ->
document:string ->
?disable_notification:bool ->
reply_to:int option ->
reply_markup:ReplyMarkup.reply_markup option ->
string Result.result Lwt.tSend a new document file to a specified chat. Note that document refers to the file's name to send.
val resend_document :
chat_id:int ->
document:string ->
?disable_notification:bool ->
reply_to:int option ->
reply_markup:ReplyMarkup.reply_markup option ->
unit Result.result Lwt.tSend an existing document file to a specified chat. Note that document refers to the file's id on the Telegram servers.
val send_sticker :
chat_id:int ->
sticker:string ->
?disable_notification:bool ->
reply_to:int option ->
reply_markup:ReplyMarkup.reply_markup option ->
string Result.result Lwt.tSend a new sticker file (webp) to a specified chat. Note that sticker refers to the file's name to send.
val resend_sticker :
chat_id:int ->
sticker:string ->
?disable_notification:bool ->
reply_to:int option ->
reply_markup:ReplyMarkup.reply_markup option ->
unit Result.result Lwt.tSend an existing sticker file (webp) to a specified chat. Note that sticker refers to the file's id on the Telegram servers.
val send_video :
chat_id:int ->
video:string ->
?duration:int option ->
?caption:string option ->
?disable_notification:bool ->
reply_to:int option ->
reply_markup:ReplyMarkup.reply_markup option ->
string Result.result Lwt.tSend a new video file (mp4/mov/webm) to a specified chat. Note that video refers to the file's name to send.
val resend_video :
chat_id:int ->
video:string ->
?duration:int option ->
?caption:string option ->
?disable_notification:bool ->
reply_to:int option ->
reply_markup:ReplyMarkup.reply_markup option ->
unit Result.result Lwt.tSend an existing video (mp4/mov/webm) file to a specified chat. Note that video refers to the file's id on the Telegram servers.
val send_voice :
chat_id:int ->
voice:string ->
?disable_notification:bool ->
reply_to:int option ->
reply_markup:ReplyMarkup.reply_markup option ->
string Result.result Lwt.tSend 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 ->
?disable_notification:bool ->
reply_to:int option ->
reply_markup:ReplyMarkup.reply_markup option ->
unit Result.result Lwt.tSend an existing voice message (ogg) to a specified chat. Note that voice refers to the file's id on the Telegram servers.
val send_location :
chat_id:int ->
latitude:float ->
longitude:float ->
?disable_notification:bool ->
reply_to:int option ->
reply_markup:ReplyMarkup.reply_markup option ->
unit Result.result Lwt.tSend a location to a specified chat
val send_venue :
chat_id:int ->
latitude:float ->
longitude:float ->
title:string ->
address:string ->
foursquare_id:string option ->
?disable_notification:bool ->
reply_to:int option ->
reply_markup:ReplyMarkup.reply_markup option ->
unit Result.result Lwt.tSend a venue to a specified chat
val send_contact :
chat_id:int ->
phone_number:string ->
first_name:string ->
last_name:string option ->
?disable_notification:bool ->
reply_to:int option ->
reply_markup:ReplyMarkup.reply_markup option ->
unit Result.result Lwt.tSend a contact to a specified chat
val get_user_profile_photos :
user_id:int ->
offset:int option ->
limit:int option ->
UserProfilePhotos.user_profile_photos Result.result Lwt.tGet a given user's profile pictures
Get the information for a file that's been uploaded to Telegram's servers by the file_id
Download a file that's been uploaded to Telegram's servers by the file_id
Download a file that's been uploaded to Telegram's servers by the file
Kick/ban a given user from the given chat
Leave a chat manually to stop receiving messages from it
Unban a given user from the given chat
Get the info for a given chat
Get the list of admins for a given chat
Get the number of members in a given chat
val get_chat_member :
chat_id:int ->
user_id:int ->
ChatMember.chat_member Result.result Lwt.tGet information about a certain member in the given chat
val answer_callback_query :
callback_query_id:string ->
?text:string option ->
?show_alert:bool ->
unit ->
unit Result.result Lwt.tAnswer a callback query sent from an inline keyboard
val answer_inline_query :
inline_query_id:string ->
results:InlineQuery.Out.inline_query_result list ->
?cache_time:int option ->
?is_personal:bool option ->
?next_offset:string option ->
unit ->
unit Result.result Lwt.tAnswers between 1 to 50 inline queries
val edit_message_text :
?chat_id:string option ->
?message_id:int option ->
?inline_message_id:string option ->
text:string ->
parse_mode:ParseMode.parse_mode option ->
disable_web_page_preview:bool ->
reply_markup:ReplyMarkup.reply_markup option ->
unit ->
unit Result.result Lwt.tEdit an existing message, selected by either the chat id, the message id, or the inline message id
val edit_message_caption :
?chat_id:string option ->
?message_id:int option ->
?inline_message_id:string option ->
caption:string ->
reply_markup:ReplyMarkup.reply_markup option ->
unit ->
unit Result.result Lwt.tEdit the caption of an existing message, selected by either the chat id, the message id, or the inline message id
val edit_message_reply_markup :
?chat_id:string option ->
?message_id:int option ->
?inline_message_id:string option ->
reply_markup:ReplyMarkup.reply_markup option ->
unit ->
unit Result.result Lwt.tEdit the reply markup of an existing message, selected by either the chat id, the message id, or the inline message id. Use None to remove the reply markup
Get a list of all available updates that the bot has received
Get the first available update from the update queue
Get the first available update from the update queue and mark it as read (deletes the update)
Run the bot with a default main loop, optionally logging the output to stdout