GramIO API Reference / gramio/dist / TelegramMessage
Interface: TelegramMessage
Defined in: @gramio/types/out/objects.d.ts:501
This object represents a message.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
animation? | TelegramAnimation | Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set | @gramio/types/out/objects.d.ts:633 |
audio? | TelegramAudio | Optional. Message is an audio file, information about the file | @gramio/types/out/objects.d.ts:637 |
author_signature? | string | Optional. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator | @gramio/types/out/objects.d.ts:605 |
boost_added? | TelegramChatBoostAdded | Optional. Service message: user boosted the chat | @gramio/types/out/objects.d.ts:821 |
business_connection_id? | string | Optional. Unique identifier of the business connection from which the message was received. If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier. | @gramio/types/out/objects.d.ts:541 |
caption? | string | Optional. Caption for the animation, audio, document, paid media, photo, video or voice | @gramio/types/out/objects.d.ts:673 |
caption_entities? | TelegramMessageEntity[] | Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption | @gramio/types/out/objects.d.ts:677 |
channel_chat_created? | true | Optional. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel. | @gramio/types/out/objects.d.ts:753 |
chat | TelegramChat | Chat the message belongs to | @gramio/types/out/objects.d.ts:545 |
chat_background_set? | TelegramChatBackground | Optional. Service message: chat background set | @gramio/types/out/objects.d.ts:825 |
chat_owner_changed? | TelegramChatOwnerChanged | Optional. Service message: chat owner has changed | @gramio/types/out/objects.d.ts:729 |
chat_owner_left? | TelegramChatOwnerLeft | Optional. Service message: chat owner has left | @gramio/types/out/objects.d.ts:725 |
chat_shared? | TelegramChatShared | Optional. Service message: a chat was shared with the bot | @gramio/types/out/objects.d.ts:789 |
checklist? | TelegramChecklist | Optional. Message is a checklist | @gramio/types/out/objects.d.ts:689 |
checklist_tasks_added? | TelegramChecklistTasksAdded | Optional. Service message: tasks were added to a checklist | @gramio/types/out/objects.d.ts:833 |
checklist_tasks_done? | TelegramChecklistTasksDone | Optional. Service message: some tasks in a checklist were marked as done or not done | @gramio/types/out/objects.d.ts:829 |
connected_website? | string | Optional. The domain name of the website on which the user has logged in. More about Telegram Login » | @gramio/types/out/objects.d.ts:805 |
contact? | TelegramContact | Optional. Message is a shared contact, information about the contact | @gramio/types/out/objects.d.ts:693 |
date | number | Date the message was sent in Unix time. It is always a positive number, representing a valid date. | @gramio/types/out/objects.d.ts:537 |
delete_chat_photo? | true | Optional. Service message: the chat photo was deleted | @gramio/types/out/objects.d.ts:741 |
dice? | TelegramDice | Optional. Message is a dice with random value | @gramio/types/out/objects.d.ts:697 |
direct_message_price_changed? | TelegramDirectMessagePriceChanged | Optional. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed | @gramio/types/out/objects.d.ts:837 |
direct_messages_topic? | TelegramDirectMessagesTopic | Optional. Information about the direct messages chat topic that contains the message | @gramio/types/out/objects.d.ts:513 |
document? | TelegramDocument | Optional. Message is a general file, information about the file | @gramio/types/out/objects.d.ts:641 |
edit_date? | number | Optional. Date the message was last edited in Unix time | @gramio/types/out/objects.d.ts:585 |
effect_id? | string | Optional. Unique identifier of the message effect added to the message | @gramio/types/out/objects.d.ts:629 |
entities? | TelegramMessageEntity[] | Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text | @gramio/types/out/objects.d.ts:617 |
external_reply? | TelegramExternalReplyInfo | Optional. Information about the message that is being replied to, which may come from another chat or forum topic | @gramio/types/out/objects.d.ts:565 |
forum_topic_closed? | TelegramForumTopicClosed | Optional. Service message: forum topic closed | @gramio/types/out/objects.d.ts:849 |
forum_topic_created? | TelegramForumTopicCreated | Optional. Service message: forum topic created | @gramio/types/out/objects.d.ts:841 |
forum_topic_edited? | TelegramForumTopicEdited | Optional. Service message: forum topic edited | @gramio/types/out/objects.d.ts:845 |
forum_topic_reopened? | TelegramForumTopicReopened | Optional. Service message: forum topic reopened | @gramio/types/out/objects.d.ts:853 |
forward_origin? | TelegramMessageOrigin | Optional. Information about the original message for forwarded messages | @gramio/types/out/objects.d.ts:549 |
from? | TelegramUser | Optional. Sender of the message; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats | @gramio/types/out/objects.d.ts:517 |
game? | TelegramGame | Optional. Message is a game, information about the game. More about games » | @gramio/types/out/objects.d.ts:701 |
general_forum_topic_hidden? | TelegramGeneralForumTopicHidden | Optional. Service message: the 'General' forum topic hidden | @gramio/types/out/objects.d.ts:857 |
general_forum_topic_unhidden? | TelegramGeneralForumTopicUnhidden | Optional. Service message: the 'General' forum topic unhidden | @gramio/types/out/objects.d.ts:861 |
gift? | TelegramGiftInfo | Optional. Service message: a regular gift was sent or received | @gramio/types/out/objects.d.ts:793 |
gift_upgrade_sent? | TelegramGiftInfo | Optional. Service message: upgrade of a gift was purchased after the gift was sent | @gramio/types/out/objects.d.ts:801 |
giveaway? | TelegramGiveaway | Optional. The message is a scheduled giveaway message | @gramio/types/out/objects.d.ts:869 |
giveaway_completed? | TelegramGiveawayCompleted | Optional. Service message: a giveaway without public winners was completed | @gramio/types/out/objects.d.ts:877 |
giveaway_created? | TelegramGiveawayCreated | Optional. Service message: a scheduled giveaway was created | @gramio/types/out/objects.d.ts:865 |
giveaway_winners? | TelegramGiveawayWinners | Optional. A giveaway with public winners was completed | @gramio/types/out/objects.d.ts:873 |
group_chat_created? | true | Optional. Service message: the group has been created | @gramio/types/out/objects.d.ts:745 |
has_media_spoiler? | true | Optional. True, if the message media is covered by a spoiler animation | @gramio/types/out/objects.d.ts:685 |
has_protected_content? | true | Optional. True, if the message can't be forwarded | @gramio/types/out/objects.d.ts:589 |
invoice? | TelegramInvoice | Optional. Message is an invoice for a payment, information about the invoice. More about payments » | @gramio/types/out/objects.d.ts:773 |
is_automatic_forward? | true | Optional. True, if the message is a channel post that was automatically forwarded to the connected discussion group | @gramio/types/out/objects.d.ts:557 |
is_from_offline? | true | Optional. True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message | @gramio/types/out/objects.d.ts:593 |
is_paid_post? | true | Optional. True, if the message is a paid post. Note that such posts must not be deleted for 24 hours to receive the payment and can't be edited. | @gramio/types/out/objects.d.ts:597 |
is_topic_message? | true | Optional. True, if the message is sent to a topic in a forum supergroup or a private chat with the bot | @gramio/types/out/objects.d.ts:553 |
left_chat_member? | TelegramUser | Optional. A member was removed from the group, information about them (this member may be the bot itself) | @gramio/types/out/objects.d.ts:721 |
link_preview_options? | TelegramLinkPreviewOptions | Optional. Options used for link preview generation for the message, if it is a text message and link preview options were changed | @gramio/types/out/objects.d.ts:621 |
location? | TelegramLocation | Optional. Message is a shared location, information about the location | @gramio/types/out/objects.d.ts:713 |
media_group_id? | string | Optional. The unique identifier inside this chat of a media message group this message belongs to | @gramio/types/out/objects.d.ts:601 |
message_auto_delete_timer_changed? | TelegramMessageAutoDeleteTimerChanged | Optional. Service message: auto-delete timer settings changed in the chat | @gramio/types/out/objects.d.ts:757 |
message_id | number | Unique message identifier inside this chat. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent | @gramio/types/out/objects.d.ts:505 |
message_thread_id? | number | Optional. Unique identifier of a message thread or forum topic to which the message belongs; for supergroups and private chats only | @gramio/types/out/objects.d.ts:509 |
migrate_from_chat_id? | number | Optional. The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier. | @gramio/types/out/objects.d.ts:765 |
migrate_to_chat_id? | number | Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier. | @gramio/types/out/objects.d.ts:761 |
new_chat_members? | TelegramUser[] | Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members) | @gramio/types/out/objects.d.ts:717 |
new_chat_photo? | TelegramPhotoSize[] | Optional. A chat photo was change to this value | @gramio/types/out/objects.d.ts:737 |
new_chat_title? | string | Optional. A chat title was changed to this value | @gramio/types/out/objects.d.ts:733 |
paid_media? | TelegramPaidMediaInfo | Optional. Message contains paid media; information about the paid media | @gramio/types/out/objects.d.ts:645 |
paid_message_price_changed? | TelegramPaidMessagePriceChanged | Optional. Service message: the price for paid messages has changed in the chat | @gramio/types/out/objects.d.ts:881 |
paid_star_count? | number | Optional. The number of Telegram Stars that were paid by the sender of the message to send it | @gramio/types/out/objects.d.ts:609 |
passport_data? | TelegramPassportData | Optional. Telegram Passport data | @gramio/types/out/objects.d.ts:813 |
photo? | TelegramPhotoSize[] | Optional. Message is a photo, available sizes of the photo | @gramio/types/out/objects.d.ts:649 |
pinned_message? | TelegramMaybeInaccessibleMessage | Optional. Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply. | @gramio/types/out/objects.d.ts:769 |
poll? | TelegramPoll | Optional. Message is a native poll, information about the poll | @gramio/types/out/objects.d.ts:705 |
proximity_alert_triggered? | TelegramProximityAlertTriggered | Optional. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location. | @gramio/types/out/objects.d.ts:817 |
quote? | TelegramTextQuote | Optional. For replies that quote part of the original message, the quoted part of the message | @gramio/types/out/objects.d.ts:569 |
refunded_payment? | TelegramRefundedPayment | Optional. Message is a service message about a refunded payment, information about the payment. More about payments » | @gramio/types/out/objects.d.ts:781 |
reply_markup? | TelegramInlineKeyboardMarkup | { toJSON: TelegramInlineKeyboardMarkup; } | Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons. | @gramio/types/out/objects.d.ts:925 |
reply_to_checklist_task_id? | number | Optional. Identifier of the specific checklist task that is being replied to | @gramio/types/out/objects.d.ts:577 |
reply_to_message? | TelegramMessage | Optional. For replies in the same chat and message thread, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply. | @gramio/types/out/objects.d.ts:561 |
reply_to_story? | TelegramStory | Optional. For replies to a story, the original story | @gramio/types/out/objects.d.ts:573 |
sender_boost_count? | number | Optional. If the sender of the message boosted the chat, the number of boosts added by the user | @gramio/types/out/objects.d.ts:525 |
sender_business_bot? | TelegramUser | Optional. The bot that actually sent the message on behalf of the business account. Available only for outgoing messages sent on behalf of the connected business account. | @gramio/types/out/objects.d.ts:529 |
sender_chat? | TelegramChat | Optional. Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field from contains a fake sender user in non-channel chats. | @gramio/types/out/objects.d.ts:521 |
sender_tag? | string | Optional. Tag or custom title of the sender of the message; for supergroups only | @gramio/types/out/objects.d.ts:533 |
show_caption_above_media? | true | Optional. True, if the caption must be shown above the message media | @gramio/types/out/objects.d.ts:681 |
sticker? | TelegramSticker | Optional. Message is a sticker, information about the sticker | @gramio/types/out/objects.d.ts:653 |
story? | TelegramStory | Optional. Message is a forwarded story | @gramio/types/out/objects.d.ts:657 |
successful_payment? | TelegramSuccessfulPayment | Optional. Message is a service message about a successful payment, information about the payment. More about payments » | @gramio/types/out/objects.d.ts:777 |
suggested_post_approval_failed? | TelegramSuggestedPostApprovalFailed | Optional. Service message: approval of a suggested post has failed | @gramio/types/out/objects.d.ts:889 |
suggested_post_approved? | TelegramSuggestedPostApproved | Optional. Service message: a suggested post was approved | @gramio/types/out/objects.d.ts:885 |
suggested_post_declined? | TelegramSuggestedPostDeclined | Optional. Service message: a suggested post was declined | @gramio/types/out/objects.d.ts:893 |
suggested_post_info? | TelegramSuggestedPostInfo | Optional. Information about suggested post parameters if the message is a suggested post in a channel direct messages chat. If the message is an approved or declined suggested post, then it can't be edited. | @gramio/types/out/objects.d.ts:625 |
suggested_post_paid? | TelegramSuggestedPostPaid | Optional. Service message: payment for a suggested post was received | @gramio/types/out/objects.d.ts:897 |
suggested_post_refunded? | TelegramSuggestedPostRefunded | Optional. Service message: payment for a suggested post was refunded | @gramio/types/out/objects.d.ts:901 |
supergroup_chat_created? | true | Optional. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup. | @gramio/types/out/objects.d.ts:749 |
text? | string | Optional. For text messages, the actual UTF-8 text of the message | @gramio/types/out/objects.d.ts:613 |
unique_gift? | TelegramUniqueGiftInfo | Optional. Service message: a unique gift was sent or received | @gramio/types/out/objects.d.ts:797 |
users_shared? | TelegramUsersShared | Optional. Service message: users were shared with the bot | @gramio/types/out/objects.d.ts:785 |
venue? | TelegramVenue | Optional. Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set | @gramio/types/out/objects.d.ts:709 |
via_bot? | TelegramUser | Optional. Bot through which the message was sent | @gramio/types/out/objects.d.ts:581 |
video? | TelegramVideo | Optional. Message is a video, information about the video | @gramio/types/out/objects.d.ts:661 |
video_chat_ended? | TelegramVideoChatEnded | Optional. Service message: video chat ended | @gramio/types/out/objects.d.ts:913 |
video_chat_participants_invited? | TelegramVideoChatParticipantsInvited | Optional. Service message: new participants invited to a video chat | @gramio/types/out/objects.d.ts:917 |
video_chat_scheduled? | TelegramVideoChatScheduled | Optional. Service message: video chat scheduled | @gramio/types/out/objects.d.ts:905 |
video_chat_started? | TelegramVideoChatStarted | Optional. Service message: video chat started | @gramio/types/out/objects.d.ts:909 |
video_note? | TelegramVideoNote | Optional. Message is a video note, information about the video message | @gramio/types/out/objects.d.ts:665 |
voice? | TelegramVoice | Optional. Message is a voice message, information about the file | @gramio/types/out/objects.d.ts:669 |
web_app_data? | TelegramWebAppData | Optional. Service message: data sent by a Web App | @gramio/types/out/objects.d.ts:921 |
write_access_allowed? | TelegramWriteAccessAllowed | Optional. Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess | @gramio/types/out/objects.d.ts:809 |