package telegraml

  1. Overview
  2. Docs

Module Telegram.ActionsSource

A module that exposes convenience functions for bot actions, equivalent to TelegramActions

include module type of struct include TelegramActions end

Chains two commands together (do one, then the other)

Sourceval (/>) : (and_then:'a -> 'b) -> 'a -> 'b

Pipes one command into the next (do one, and use its result)

Finish a sequence of commands using (/>)

Sequence a list of commands in the provided order

Examples:

  • command /> fun _ -> command2 /> finish
  • command /+ command2
  • sequence [ command; command2 ]
Sourceval send_message : chat_id:int -> ?parse_mode:TelegramApi.ParseMode.parse_mode -> ?disable_web_page_preview:bool -> ?disable_notification:bool -> ?reply_to:int -> ?reply_markup:TelegramApi.ReplyMarkup.reply_markup -> ('a, unit, string, TelegramApi.Command.action) format4 -> 'a
Sourceval forward_message : chat_id:int -> from_chat_id:int -> ?disable_notification:bool -> message_id:int -> TelegramApi.Command.action
Sourceval send_chat_action : chat_id:int -> TelegramApi.ChatAction.action -> TelegramApi.Command.action
Sourceval send_photo : chat_id:int -> ?caption:string -> ?disable_notification:bool -> ?reply_to:int -> ?reply_markup:TelegramApi.ReplyMarkup.reply_markup -> string -> and_then:(string TelegramApi.Result.result -> TelegramApi.Command.action) -> TelegramApi.Command.action
Sourceval resend_photo : chat_id:int -> ?caption:string -> ?disable_notification:bool -> ?reply_to:int -> ?reply_markup:TelegramApi.ReplyMarkup.reply_markup -> string -> TelegramApi.Command.action
Sourceval send_audio : chat_id:int -> performer:string -> title:string -> ?disable_notification:bool -> ?reply_to:int -> ?reply_markup:TelegramApi.ReplyMarkup.reply_markup -> string -> and_then:(string TelegramApi.Result.result -> TelegramApi.Command.action) -> TelegramApi.Command.action
Sourceval resend_audio : chat_id:int -> performer:string -> title:string -> ?disable_notification:bool -> ?reply_to:int -> ?reply_markup:TelegramApi.ReplyMarkup.reply_markup -> string -> TelegramApi.Command.action
Sourceval send_document : chat_id:int -> ?disable_notification:bool -> ?reply_to:int -> ?reply_markup:TelegramApi.ReplyMarkup.reply_markup -> string -> and_then:(string TelegramApi.Result.result -> TelegramApi.Command.action) -> TelegramApi.Command.action
Sourceval resend_document : chat_id:int -> ?disable_notification:bool -> ?reply_to:int -> ?reply_markup:TelegramApi.ReplyMarkup.reply_markup -> string -> TelegramApi.Command.action
Sourceval send_sticker : chat_id:int -> ?disable_notification:bool -> ?reply_to:int -> ?reply_markup:TelegramApi.ReplyMarkup.reply_markup -> string -> and_then:(string TelegramApi.Result.result -> TelegramApi.Command.action) -> TelegramApi.Command.action
Sourceval resend_sticker : chat_id:int -> ?disable_notification:bool -> ?reply_to:int -> ?reply_markup:TelegramApi.ReplyMarkup.reply_markup -> string -> TelegramApi.Command.action
Sourceval send_video : chat_id:int -> ?duration:int -> ?caption:string -> ?disable_notification:bool -> ?reply_to:int -> ?reply_markup:TelegramApi.ReplyMarkup.reply_markup -> string -> and_then:(string TelegramApi.Result.result -> TelegramApi.Command.action) -> TelegramApi.Command.action
Sourceval resend_video : chat_id:int -> ?duration:int -> ?caption:string -> ?disable_notification:bool -> ?reply_to:int -> ?reply_markup:TelegramApi.ReplyMarkup.reply_markup -> string -> TelegramApi.Command.action
Sourceval send_voice : chat_id:int -> ?disable_notification:bool -> ?reply_to:int -> ?reply_markup:TelegramApi.ReplyMarkup.reply_markup -> string -> and_then:(string TelegramApi.Result.result -> TelegramApi.Command.action) -> TelegramApi.Command.action
Sourceval resend_voice : chat_id:int -> ?disable_notification:bool -> ?reply_to:int -> ?reply_markup:TelegramApi.ReplyMarkup.reply_markup -> string -> TelegramApi.Command.action
Sourceval send_location : chat_id:int -> ?disable_notification:bool -> ?reply_to:int -> ?reply_markup:TelegramApi.ReplyMarkup.reply_markup -> latitude:float -> longitude:float -> TelegramApi.Command.action
Sourceval send_venue : chat_id:int -> ?disable_notification:bool -> ?reply_to:int -> ?reply_markup:TelegramApi.ReplyMarkup.reply_markup -> latitude:float -> longitude:float -> title:string -> address:string -> foursquare_id:string option -> TelegramApi.Command.action
Sourceval send_contact : chat_id:int -> ?disable_notification:bool -> ?reply_to:int -> ?reply_markup:TelegramApi.ReplyMarkup.reply_markup -> phone_number:string -> first_name:string -> last_name:string option -> TelegramApi.Command.action
Sourceval get_file' : string -> and_then:(string option -> TelegramApi.Command.action) -> TelegramApi.Command.action
Sourceval download_file : TelegramApi.File.file -> and_then:(string option -> TelegramApi.Command.action) -> TelegramApi.Command.action
Sourceval kick_chat_member : chat_id:int -> user_id:int -> TelegramApi.Command.action
Sourceval leave_chat : chat_id:int -> TelegramApi.Command.action
Sourceval unban_chat_member : chat_id:int -> user_id:int -> TelegramApi.Command.action
Sourceval get_chat_members_count : chat_id:int -> and_then:(int TelegramApi.Result.result -> TelegramApi.Command.action) -> TelegramApi.Command.action
Sourceval answer_callback_query : ?text:string -> ?show_alert:bool -> string -> TelegramApi.Command.action
Sourceval answer_inline_query : ?cache_time:int -> ?is_personal:bool -> ?next_offset:string -> string -> TelegramApi.InlineQuery.Out.inline_query_result list -> TelegramApi.Command.action
Sourceval edit_message_text : id:[ `ChatMessageId of string * int | `InlineMessageId of string ] -> ?parse_mode:TelegramApi.ParseMode.parse_mode -> ?disable_web_page_preview:bool -> ?reply_markup:TelegramApi.ReplyMarkup.reply_markup -> ('a, unit, string, TelegramApi.Command.action) format4 -> 'a
Sourceval edit_message_caption : id:[ `ChatMessageId of string * int | `InlineMessageId of string ] -> ?reply_markup:TelegramApi.ReplyMarkup.reply_markup -> ('a, unit, string, TelegramApi.Command.action) format4 -> 'a
Sourceval edit_message_reply_markup : id:[ `ChatMessageId of string * int | `InlineMessageId of string ] -> reply_markup:TelegramApi.ReplyMarkup.reply_markup -> TelegramApi.Command.action
  • parameter run_commands:

    true by default. States whether to evaluate commands, inline queries, chat events, and callback queries

OCaml

Innovation. Community. Security.