package telegraml
Module TelegramApi.MessageSource
Source
type message = {message_id : int;from : User.user option;date : int;chat : Chat.chat;forward_from : User.user option;forward_from_chat : Chat.chat option;forward_date : int option;reply_to_message : message option;edit_date : int option;text : string option;entities : MessageEntity.message_entity list option;audio : Audio.audio option;document : Document.document option;photo : PhotoSize.photo_size list option;sticker : Sticker.sticker option;video : Video.video option;voice : Voice.voice option;caption : string option;contact : Contact.contact option;location : Location.location option;venue : Venue.venue option;new_chat_member : User.user option;left_chat_member : User.user option;new_chat_title : string option;new_chat_photo : PhotoSize.photo_size list option;delete_chat_photo : bool option;group_chat_created : bool option;supergroup_chat_created : bool option;channel_chat_created : bool option;migrate_to_chat_id : int option;migrate_from_chat_id : int option;pinned_message : message option;
}Represents a message in a chat. Note that photo should be a list of PhotoSize.photo_sizes if it exists
Source
val create :
message_id:int ->
?from:User.user option ->
date:int ->
chat:Chat.chat ->
?forward_from:User.user option ->
?forward_from_chat:Chat.chat option ->
?forward_date:int option ->
?reply_to:message option ->
?edit_date:int option ->
?text:string option ->
?entities:MessageEntity.message_entity list option ->
?audio:Audio.audio option ->
?document:Document.document option ->
?photo:PhotoSize.photo_size list option ->
?sticker:Sticker.sticker option ->
?video:Video.video option ->
?voice:Voice.voice option ->
?caption:string option ->
?contact:Contact.contact option ->
?location:Location.location option ->
?venue:Venue.venue option ->
?new_chat_member:User.user option ->
?left_chat_member:User.user option ->
?new_chat_title:string option ->
?new_chat_photo:PhotoSize.photo_size list option ->
?delete_chat_photo:bool option ->
?group_chat_created:bool option ->
?supergroup_chat_created:bool option ->
?channel_chat_created:bool option ->
?migrate_to_chat_id:int option ->
?migrate_from_chat_id:int option ->
?pinned_message:message option ->
unit ->
messageCreate a message in a concise manner
Read a message out of some JSON
Read a message out of some JSON
Get the first name of the user who sent the message
Get the username of the user who sent the message
Get the username of the user who sent the message
Get a formatted name for the user who sent the message: first name, with the username in parentheses if it exists