optns
https://w1.nandbox.net/message-object
Message
The main message method defines all parameters for all incoming messages to the bot.
| Field | Type | Required | Description |
|---|---|---|---|
| message_id | String | Yes | Unique identifier for this message. |
| reference | Long | Yes | Unique local identifier |
| chat | Chat | Yes | Conversation the message belongs to. |
| from | User | Yes | Sender User of this message |
| sent_to | User | Yes | Receiver user, most of the case it is the bot ID except if channel has multiple administrators, it will be the specific admin who should receive the message. |
| type | String | Yes | "text": For text messages "text_file": Message is a text tile. Any message exceeds 1800 characters will be converted to text file. "photo":Message is a photo."gif": Message is a GIF"sticker": Message is a sticker."video": Message is a video"audio": Message is an audio"voice": Message is a voice note "location": Message is a location"contact": Message is a contact "document": Message is a document |
| date | Long | Yes | Date the message was sent in Unix Epoch timestamp in milliseconds. |
| reply_to_message_id | String | Optional | Parent message Unique identifier. |
| from_admin | Integer | Optional | 1 if from user is admin, otherwise it is 0 |
| text | String | Conditional | Only available when type is text |
| text_file | Text_File | Conditional | Only available when type is text_file |
| photo | Photo | Conditional | Only available when type is photo |
| gif | GIF | Conditional | Only available when type is gif |
| sticker | Sticker | Conditional | Only available when type is sticker |
| video | Video | Conditional | Only available when type is video |
| audio | Audio | Conditional | Only available when type is audio |
| voice | Voice | Conditional | Only available when type is voice |
| document | Document | Conditional | Only available when type is document |
| location | Location | Conditional | Only available when type is location |
| contact | Contact | Conditional | Only available when type is contact |
| status | String | Optional | "deleted" if messages is recalled and "updated" if it is updated. |
| chat_settings | Integer | Optional | 1 if from chat settings bot, otherwise it is 0 |
| menu_ref | String | Optional | Menu reference for existing predefined Menu. The menu will be displayed as inline menu associated to the message. |
| inline_menu | Array of Menu | Optional | Inline menu object to hold menus.If both inline_menu and menu_ref are defined. Priority for inline_menu. |
| caption | String | ||
| bg_color | String | ||
| article | Article | ||
| url | String | ||
| white_list_user | WhiteListUser | ||
| tag | TagDefinition | ||
| schedule_date | Long | Optional | Long time format like this example 1579102262 |
Text_File
This object represents a text file.
| Field | Type | Required | Description |
|---|---|---|---|
| Id | String | Yes | Unique identifier for this file |
| size | Integer | Yes | File size. |
