module Message:sig
..end
type
message = {
|
message_id : |
|
from : |
|
date : |
|
chat : |
|
forward_from : |
|
forward_from_chat : |
|
forward_date : |
|
reply_to_message : |
|
edit_date : |
|
text : |
|
entities : |
|
audio : |
|
document : |
|
photo : |
|
sticker : |
|
video : |
|
voice : |
|
: |
|
contact : |
|
location : |
|
venue : |
|
new_chat_member : |
|
left_chat_member : |
|
new_chat_title : |
|
new_chat_photo : |
|
delete_chat_photo : |
|
group_chat_created : |
|
supergroup_chat_created : |
|
channel_chat_created : |
|
migrate_to_chat_id : |
|
migrate_from_chat_id : |
|
pinned_message : |
photo
should be a list of PhotoSize.photo_size
s if it existsval create : message_id:int ->
?from:TelegramApi.User.user option ->
date:int ->
chat:TelegramApi.Chat.chat ->
?forward_from:TelegramApi.User.user option ->
?forward_from_chat:TelegramApi.Chat.chat option ->
?forward_date:int option ->
?reply_to:message option ->
?edit_date:int option ->
?text:string option ->
?entities:TelegramApi.MessageEntity.message_entity list option ->
?audio:TelegramApi.Audio.audio option ->
?document:TelegramApi.Document.document option ->
?photo:TelegramApi.PhotoSize.photo_size list option ->
?sticker:TelegramApi.Sticker.sticker option ->
?video:TelegramApi.Video.video option ->
?voice:TelegramApi.Voice.voice option ->
?caption:string option ->
?contact:TelegramApi.Contact.contact option ->
?location:TelegramApi.Location.location option ->
?venue:TelegramApi.Venue.venue option ->
?new_chat_member:TelegramApi.User.user option ->
?left_chat_member:TelegramApi.User.user option ->
?new_chat_title:string option ->
?new_chat_photo:TelegramApi.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 -> message
message
in a concise manner
Read a message
out of some JSON
val read : Yojson.Safe.json -> message
val get_sender_first_name : message -> string
Get the username of the user who sent the message
val get_sender_username : message -> string
val get_sender : message -> string