Module Api.Message

module Message: sig .. end

type message = {
   message_id : int;
   from : Api.User.user option;
   date : int;
   chat : Api.Chat.chat;
   forward_from : Api.User.user option;
   forward_date : int option;
   reply_to_message : message option;
   text : string option;
   audio : Api.Audio.audio option;
   document : Api.Document.document option;
   photo : Api.PhotoSize.photo_size list option;
   sticker : Api.Sticker.sticker option;
   video : Api.Video.video option;
   voice : Api.Voice.voice option;
   caption : string option;
   contact : Api.Contact.contact option;
   location : Api.Location.location option;
}
Represents a message in a chat. Note that `photo` should be a list of `PhotoSize.photo_size`s if it exists

Create a `message` in a concise manner

val create : message_id:int ->
?from:Api.User.user option ->
date:int ->
chat:Api.Chat.chat ->
?forward_from:Api.User.user option ->
?forward_date:int option ->
?reply_to:message option ->
?text:string option ->
?audio:Api.Audio.audio option ->
?document:Api.Document.document option ->
?photo:Api.PhotoSize.photo_size list option ->
?sticker:Api.Sticker.sticker option ->
?video:Api.Video.video option ->
?voice:Api.Voice.voice option ->
?caption:string option ->
?contact:Api.Contact.contact option ->
?location:Api.Location.location option -> unit -> message
Read a `message` out of some JSON
val read : Yojson.Safe.json -> message
val get_sender_first_name : message -> string
Get the first name of the user who sent the message

Get the username of the user who sent the message

val get_sender_username : message -> string
Get a formatted name for the user who sent the message: first name, with the username in parentheses if it exists
val get_sender : message -> string