package telegraml

  1. Overview
  2. Docs

This module is used to deal with outgoing replies to inline queries for an InlineQuery bot

type article = {
  1. id : string;
  2. title : string;
  3. input_message_content : InputMessageContent.input_message_content;
  4. reply_markup : ReplyMarkup.reply_markup option;
  5. url : string option;
  6. hide_url : bool option;
  7. description : string option;
  8. thumb_url : string option;
  9. thumb_width : int option;
  10. thumb_height : int option;
}

Represents an article sent as a reply

Represents a photo (jpeg) sent as a reply

type photo = {
  1. id : string;
  2. photo_url : string;
  3. thumb_url : string;
  4. photo_width : int option;
  5. photo_height : int option;
  6. title : string option;
  7. description : string option;
  8. caption : string option;
  9. reply_markup : ReplyMarkup.reply_markup option;
  10. input_message_content : InputMessageContent.input_message_content option;
}

Represents a photo (jpeg) sent as a reply

Represents a gif sent as a reply

type gif = {
  1. id : string;
  2. gif_url : string;
  3. gif_width : int option;
  4. gif_height : int option;
  5. thumb_url : string;
  6. title : string option;
  7. caption : string option;
  8. reply_markup : ReplyMarkup.reply_markup option;
  9. input_message_content : InputMessageContent.input_message_content option;
}

Represents a gif sent as a reply

Represents a gif sent as a reply, but converted to an mp4 video file

type mpeg4gif = {
  1. id : string;
  2. mpeg4_url : string;
  3. mpeg4_width : int option;
  4. mpeg4_height : int option;
  5. thumb_url : string;
  6. title : string option;
  7. caption : string option;
  8. reply_markup : ReplyMarkup.reply_markup option;
  9. input_message_content : InputMessageContent.input_message_content option;
}

Represents a gif sent as a reply, but converted to an mp4 video file

Represents a video sent as a reply

type video = {
  1. id : string;
  2. video_url : string;
  3. mime_type : string;
  4. thumb_url : string;
  5. title : string;
  6. caption : string option;
  7. video_width : int option;
  8. video_height : int option;
  9. video_duration : int option;
  10. description : string option;
  11. reply_markup : ReplyMarkup.reply_markup option;
  12. input_message_content : InputMessageContent.input_message_content option;
}

Represents a video sent as a reply

Represents an audio file (mp3) sent as a reply

type audio = {
  1. id : string;
  2. audio_url : string;
  3. title : string;
  4. performer : string option;
  5. audio_duration : int option;
  6. reply_markup : ReplyMarkup.reply_markup option;
  7. input_message_content : InputMessageContent.input_message_content option;
}

Represents an audio file (mp3) sent as a reply

Represents a voice recording (ogg) sent as a reply

type voice = {
  1. id : string;
  2. voice_url : string;
  3. title : string;
  4. voice_duration : int option;
  5. reply_markup : ReplyMarkup.reply_markup option;
  6. input_message_content : InputMessageContent.input_message_content option;
}

Represents a voice recording (ogg) sent as a reply

Represents a generic file/document (.pdf/.zip supported) sent as a reply

type document = {
  1. id : string;
  2. title : string;
  3. caption : string option;
  4. document_url : string;
  5. mime_type : string;
  6. description : string option;
  7. reply_markup : ReplyMarkup.reply_markup option;
  8. input_message_content : InputMessageContent.input_message_content option;
  9. thumb_url : string option;
  10. thumb_width : int option;
  11. thumb_height : int option;
}

Represents a generic file/document (.pdf/.zip supported) sent as a reply

Represents a location on a map (usually the user's location)

type location = {
  1. id : string;
  2. latitude : float;
  3. longitude : float;
  4. title : string;
  5. reply_markup : ReplyMarkup.reply_markup option;
  6. input_message_content : InputMessageContent.input_message_content option;
  7. thumb_url : string option;
  8. thumb_width : int option;
  9. thumb_height : int option;
}

Represents a location on a map (usually the user's location)

Represents a venue for an event set by the user

type venue = {
  1. id : string;
  2. latitude : float;
  3. longitude : float;
  4. title : string;
  5. address : string;
  6. foursquare_id : string option;
  7. reply_markup : ReplyMarkup.reply_markup option;
  8. input_message_content : InputMessageContent.input_message_content option;
  9. thumb_url : string option;
  10. thumb_width : int option;
  11. thumb_height : int option;
}

Represents a venue for an event set by the user

Represents contact info for a user being sent

type contact = {
  1. id : string;
  2. phone_number : string;
  3. first_name : string;
  4. last_name : string option;
  5. reply_markup : ReplyMarkup.reply_markup option;
  6. input_message_content : InputMessageContent.input_message_content option;
  7. thumb_url : string option;
  8. thumb_width : int option;
  9. thumb_height : int option;
}

Represents contact info for a user being sent

Represents a photo, which has already been uploaded to the Telegram servers, sent as a reply

type cached_photo = {
  1. id : string;
  2. photo_file_id : string;
  3. title : string option;
  4. description : string option;
  5. caption : string option;
  6. reply_markup : ReplyMarkup.reply_markup option;
  7. input_message_content : InputMessageContent.input_message_content option;
}

Represents a photo, which has already been uploaded to the Telegram servers, sent as a reply

Represents a gif, which has already been uploaded to the Telegram servers, sent as a reply

type cached_gif = {
  1. id : string;
  2. gif_file_id : string;
  3. title : string option;
  4. caption : string option;
  5. reply_markup : ReplyMarkup.reply_markup option;
  6. input_message_content : InputMessageContent.input_message_content option;
}

Represents a gif, which has already been uploaded to the Telegram servers, sent as a reply

Represents a gif, which has already been uploaded to the Telegram servers, sent as a reply, but converted to an mp4 video file

type cached_mpeg4gif = {
  1. id : string;
  2. mpeg4_file_id : string;
  3. title : string option;
  4. caption : string option;
  5. reply_markup : ReplyMarkup.reply_markup option;
  6. input_message_content : InputMessageContent.input_message_content option;
}

Represents a gif, which has already been uploaded to the Telegram servers, sent as a reply, but converted to an mp4 video file

Represents a link to a sticker stored on the Telegram servers

type cached_sticker = {
  1. id : string;
  2. sticker_file_id : string;
  3. reply_markup : ReplyMarkup.reply_markup option;
  4. input_message_content : InputMessageContent.input_message_content option;
}

Represents a link to a sticker stored on the Telegram servers

Represents a file (PDF or ZIP), which has already been uploaded to the Telegram servers, sent as a reply

type cached_document = {
  1. id : string;
  2. title : string;
  3. document_file_id : string;
  4. description : string option;
  5. caption : string option;
  6. reply_markup : ReplyMarkup.reply_markup option;
  7. input_message_content : InputMessageContent.input_message_content option;
}

Represents a file (PDF or ZIP), which has already been uploaded to the Telegram servers, sent as a reply

Represents a video, which has already been uploaded to the Telegram servers, sent as a reply

type cached_video = {
  1. id : string;
  2. video_file_id : string;
  3. title : string;
  4. description : string option;
  5. caption : string option;
  6. reply_markup : ReplyMarkup.reply_markup option;
  7. input_message_content : InputMessageContent.input_message_content option;
}

Represents a video, which has already been uploaded to the Telegram servers, sent as a reply

Represents a voice recording (OGG), which has already been uploaded to the Telegram servers, sent as a reply

type cached_voice = {
  1. id : string;
  2. voice_file_id : string;
  3. title : string;
  4. reply_markup : ReplyMarkup.reply_markup option;
  5. input_message_content : InputMessageContent.input_message_content option;
}

Represents a voice recording (OGG), which has already been uploaded to the Telegram servers, sent as a reply

Represents an audio clip (MP3), which has already been uploaded to the Telegram servers, sent as a reply

type cached_audio = {
  1. id : string;
  2. audio_file_id : string;
  3. reply_markup : ReplyMarkup.reply_markup option;
  4. input_message_content : InputMessageContent.input_message_content option;
}

Represents an audio clip (MP3), which has already been uploaded to the Telegram servers, sent as a reply

type inline_query_result =
  1. | Article of article
  2. | Photo of photo
  3. | Gif of gif
  4. | Mpeg4Gif of mpeg4gif
  5. | Video of video
  6. | Audio of audio
  7. | Voice of voice
  8. | Document of document
  9. | Location of location
  10. | Venue of venue
  11. | Contact of contact
  12. | CachedPhoto of cached_photo
  13. | CachedGif of cached_gif
  14. | CachedMpeg4Gif of cached_mpeg4gif
  15. | CachedSticker of cached_sticker
  16. | CachedDocument of cached_document
  17. | CachedVideo of cached_video
  18. | CachedVoice of cached_voice
  19. | CachedAudio of cached_audio

Represents all the replies that can be given to an inline query

val create_article : id:string -> title:string -> input_message_content:InputMessageContent.input_message_content -> ?reply_markup:ReplyMarkup.reply_markup -> ?url:string -> ?hide_url:bool -> ?description:string -> ?thumb_url:string -> ?thumb_width:int -> ?thumb_height:int -> unit -> inline_query_result

Create an Article : inline_query_result in a concise manner

Create a Photo : inline_query_result in a concise manner

val create_photo : id:string -> photo_url:string -> thumb_url:string -> ?photo_width:int -> ?photo_height:int -> ?title:string -> ?description:string -> ?caption:string -> ?reply_markup:ReplyMarkup.reply_markup -> ?input_message_content:InputMessageContent.input_message_content -> unit -> inline_query_result

Create a Photo : inline_query_result in a concise manner

Create a Gif : inline_query_result in a concise manner

val create_gif : id:string -> gif_url:string -> ?gif_width:int -> ?gif_height:int -> thumb_url:string -> ?title:string -> ?caption:string -> ?reply_markup:ReplyMarkup.reply_markup -> ?input_message_content:InputMessageContent.input_message_content -> unit -> inline_query_result

Create a Gif : inline_query_result in a concise manner

Create an Mpeg4Gif : inline_query_result in a concise manner

val create_mpeg4gif : id:string -> mpeg4_url:string -> ?mpeg4_width:int -> ?mpeg4_height:int -> thumb_url:string -> ?title:string -> ?caption:string -> ?reply_markup:ReplyMarkup.reply_markup -> ?input_message_content:InputMessageContent.input_message_content -> unit -> inline_query_result

Create an Mpeg4Gif : inline_query_result in a concise manner

Create a Video : inline_query_result in a concise manner

val create_video : id:string -> video_url:string -> mime_type:string -> thumb_url:string -> title:string -> ?caption:string -> ?video_width:int -> ?video_height:int -> ?video_duration:int -> ?description:string -> ?reply_markup:ReplyMarkup.reply_markup -> ?input_message_content:InputMessageContent.input_message_content -> unit -> inline_query_result

Create a Video : inline_query_result in a concise manner

Create an Audio : inline_query_result in a concise manner

val create_audio : id:string -> audio_url:string -> title:string -> ?performer:string -> ?audio_duration:int -> ?reply_markup:ReplyMarkup.reply_markup -> ?input_message_content:InputMessageContent.input_message_content -> unit -> inline_query_result

Create an Audio : inline_query_result in a concise manner

Create a Voice : inline_query_result in a concise manner

val create_voice : id:string -> voice_url:string -> title:string -> ?voice_duration:int -> ?reply_markup:ReplyMarkup.reply_markup -> ?input_message_content:InputMessageContent.input_message_content -> unit -> inline_query_result

Create a Voice : inline_query_result in a concise manner

Create a Document : inline_query_result in a concise manner

val create_document : id:string -> title:string -> ?caption:string -> document_url:string -> mime_type:string -> ?description:string -> ?reply_markup:ReplyMarkup.reply_markup -> ?input_message_content:InputMessageContent.input_message_content -> ?thumb_url:string -> ?thumb_width:int -> ?thumb_height:int -> unit -> inline_query_result

Create a Document : inline_query_result in a concise manner

Create a Location : inline_query_result in a concise manner

val create_location : id:string -> latitude:float -> longitude:float -> title:string -> ?reply_markup:ReplyMarkup.reply_markup -> ?input_message_content:InputMessageContent.input_message_content -> ?thumb_url:string -> ?thumb_width:int -> ?thumb_height:int -> unit -> inline_query_result

Create a Location : inline_query_result in a concise manner

Create a Venue : inline_query_result in a concise manner

val create_venue : id:string -> latitude:float -> longitude:float -> title:string -> address:string -> ?foursquare_id:string -> ?reply_markup:ReplyMarkup.reply_markup -> ?input_message_content:InputMessageContent.input_message_content -> ?thumb_url:string -> ?thumb_width:int -> ?thumb_height:int -> unit -> inline_query_result

Create a Venue : inline_query_result in a concise manner

Create a Contact : inline_query_result in a concise manner

val create_contact : id:string -> phone_number:string -> first_name:string -> ?last_name:string -> ?reply_markup:ReplyMarkup.reply_markup -> ?input_message_content:InputMessageContent.input_message_content -> ?thumb_url:string -> ?thumb_width:int -> ?thumb_height:int -> unit -> inline_query_result

Create a Contact : inline_query_result in a concise manner

Create a CachedPhoto : inline_query_result in a concise manner

val create_cached_photo : id:string -> photo_file_id:string -> ?title:string -> ?description:string -> ?caption:string -> ?reply_markup:ReplyMarkup.reply_markup -> ?input_message_content:InputMessageContent.input_message_content -> unit -> inline_query_result

Create a CachedPhoto : inline_query_result in a concise manner

Create a CachedGif : inline_query_result in a concise manner

val create_cached_gif : id:string -> gif_file_id:string -> ?title:string -> ?caption:string -> ?reply_markup:ReplyMarkup.reply_markup -> ?input_message_content:InputMessageContent.input_message_content -> unit -> inline_query_result

Create a CachedGif : inline_query_result in a concise manner

Create a CachedMpeg4Gif : inline_query_result in a concise manner

val create_cached_mpeg4gif : id:string -> mpeg4_file_id:string -> ?title:string -> ?caption:string -> ?reply_markup:ReplyMarkup.reply_markup -> ?input_message_content:InputMessageContent.input_message_content -> unit -> inline_query_result

Create a CachedMpeg4Gif : inline_query_result in a concise manner

Create a CachedSticker : inline_query_result in a concise manner

val create_cached_sticker : id:string -> sticker_file_id:string -> ?reply_markup:ReplyMarkup.reply_markup -> ?input_message_content:InputMessageContent.input_message_content -> unit -> inline_query_result

Create a CachedSticker : inline_query_result in a concise manner

Create a CachedDocument : inline_query_result in a concise manner

val create_cached_document : id:string -> title:string -> document_file_id:string -> ?description:string -> ?caption:string -> ?reply_markup:ReplyMarkup.reply_markup -> ?input_message_content:InputMessageContent.input_message_content -> unit -> inline_query_result

Create a CachedDocument : inline_query_result in a concise manner

Create a CachedVideo : inline_query_result in a concise manner

val create_cached_video : id:string -> video_file_id:string -> title:string -> ?description:string -> ?caption:string -> ?reply_markup:ReplyMarkup.reply_markup -> ?input_message_content:InputMessageContent.input_message_content -> unit -> inline_query_result

Create a CachedVideo : inline_query_result in a concise manner

Create a CachedVoice : inline_query_result in a concise manner

val create_cached_voice : id:string -> voice_file_id:string -> title:string -> ?reply_markup:ReplyMarkup.reply_markup -> ?input_message_content:InputMessageContent.input_message_content -> unit -> inline_query_result

Create a CachedVoice : inline_query_result in a concise manner

Create a CachedAudio : inline_query_result in a concise manner

val create_cached_audio : id:string -> audio_file_id:string -> ?reply_markup:ReplyMarkup.reply_markup -> ?input_message_content:InputMessageContent.input_message_content -> unit -> inline_query_result

Create a CachedAudio : inline_query_result in a concise manner

Prepare an inline_query_result for sending

val prepare : inline_query_result -> Yojson.Safe.json

Prepare an inline_query_result for sending

OCaml

Innovation. Community. Security.