Message
This object represents a message.
Extends
[Message.MediaMessage]
Properties
text
text?: string;
For text messages, the actual UTF-8 text of the message
entities
entities?: MessageEntity[];
For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text
animation
animation?: Animation;
Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set
audio
audio?: Audio;
Message is an audio file, information about the file
document
document?: Document;
Message is a general file, information about the file
photo
photo?: PhotoSize[];
Message is a photo, available sizes of the photo
sticker
sticker?: Sticker;
Message is a sticker, information about the sticker
story
story?: Story;
Message is a forwarded story
video
video?: Video;
Message is a video, information about the video
video_note
video_note?: VideoNote;
Message is a video note, information about the video message
voice
voice?: Voice;
Message is a voice message, information about the file
contact
contact?: Contact;
Message is a shared contact, information about the contact
dice
dice?: Dice;
Message is a dice with random value
game
game?: Game;
Message is a game, information about the game. More about games »
poll
poll?: Poll;
Message is a native poll, information about the poll
venue
venue?: Venue;
Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set
location
location?: Location;
Message is a shared location, information about the location
paid_media
paid_media?: PaidMediaInfo;
Message contains paid media; information about the paid media
new_chat_members
new_chat_members?: User[];
New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)
left_chat_member
left_chat_member?: User;
A member was removed from the group, information about them (this member may be the bot itself)
new_chat_title
new_chat_title?: string;
A chat title was changed to this value
new_chat_photo
new_chat_photo?: PhotoSize[];
A chat photo was change to this value
delete_chat_photo
delete_chat_photo?: true;
Service message: the chat photo was deleted
group_chat_created
group_chat_created?: true;
Service message: the group has been created
supergroup_chat_created
supergroup_chat_created?: true;
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.
channel_chat_created
channel_chat_created?: true;
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.
message_auto_delete_timer_changed
message_auto_delete_timer_changed?: MessageAutoDeleteTimerChanged;
Service message: auto-delete timer settings changed in the chat
migrate_to_chat_id
migrate_to_chat_id?: number;
The group has been migrated to a supergroup with the specified identifier.
migrate_from_chat_id
migrate_from_chat_id?: number;
The supergroup has been migrated from a group with the specified identifier.
pinned_message
pinned_message?: MaybeInaccessibleMessage;
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.
invoice
invoice?: Invoice;
Message is an invoice for a payment, information about the invoice. More about payments »
successful_payment
successful_payment?: SuccessfulPayment;
Message is a service message about a successful payment, information about the payment. More about payments »
refunded_payment
refunded_payment?: RefundedPayment;
Message is a service message about a refunded payment, information about the payment. More about payments »
users_shared
users_shared?: UsersShared;
Service message: users were shared with the bot
chat_shared
chat_shared?: ChatShared;
Service message: a chat was shared with the bot
connected_website
connected_website?: string;
The domain name of the website on which the user has logged in. More about Telegram Login »
write_access_allowed
write_access_allowed?: WriteAccessAllowed;
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
passport_data
passport_data?: PassportData;
Telegram Passport data
proximity_alert_triggered
proximity_alert_triggered?: ProximityAlertTriggered;
Service message. A user in the chat triggered another user’s proximity alert while sharing Live Location.
boost_added
boost_added?: ChatBoostAdded;
Service message: user boosted the chat
chat_background_set
chat_background_set?: ChatBackground;
forum_topic_created
forum_topic_created?: ForumTopicCreated;
Service message: forum topic created
forum_topic_edited
forum_topic_edited?: ForumTopicEdited;
Service message: forum topic edited
forum_topic_closed
forum_topic_closed?: ForumTopicClosed;
Service message: forum topic closed
forum_topic_reopened
forum_topic_reopened?: ForumTopicReopened;
Service message: forum topic reopened
general_forum_topic_hidden
general_forum_topic_hidden?: GeneralForumTopicHidden;
Service message: the ‘General’ forum topic hidden
general_forum_topic_unhidden
general_forum_topic_unhidden?: GeneralForumTopicUnhidden;
Service message: the ‘General’ forum topic unhidden
giveaway_created
giveaway_created?: GiveawayCreated;
Service message: a scheduled giveaway was created
giveaway
giveaway?: Giveaway;
The message is a scheduled giveaway message
giveaway_winners
giveaway_winners?: GiveawayWinners;
A giveaway with public winners was completed
giveaway_completed
giveaway_completed?: GiveawayCompleted;
Service message: a giveaway without public winners was completed
video_chat_scheduled
video_chat_scheduled?: VideoChatScheduled;
Service message: video chat scheduled
video_chat_started
video_chat_started?: VideoChatStarted;
Service message: video chat started
video_chat_ended
video_chat_ended?: VideoChatEnded;
Service message: video chat ended
video_chat_participants_invited
video_chat_participants_invited?: VideoChatParticipantsInvited;
Service message: new participants invited to a video chat
web_app_data
web_app_data?: WebAppData;
Service message: data sent by a Web App
Interfaces
Type Aliases
- Text
Message - Audio
Message - Document
Message - Animation
Message - Photo
Message - Sticker
Message - Story
Message - Video
Message - Video
Note Message - Voice
Message - Contact
Message - Dice
Message - Game
Message - Poll
Message - Venue
Message - Location
Message - Paid
Media Message - New
Chat Members Message - Left
Chat Member Message - New
Chat Title Message - New
Chat Photo Message - Delete
Chat Photo Message - Group
Chat Created Message - Supergroup
Chat Created - Channel
Chat Created Message - Message
Auto Delete Timer Changed Message - Migrate
ToChat IdMessage - Migrate
From Chat IdMessage - Pinned
Message Message - Invoice
Message - Successful
Payment Message - Refunded
Payment Message - Users
Shared Message - Chat
Shared Message - Connected
Website Message - Write
Access Allowed Message - Passport
Data Message - Proximity
Alert Triggered Message - Boost
Added Message - Chat
Background Set Message - Forum
Topic Created Message - Forum
Topic Edited Message - Forum
Topic Closed Message - Forum
Topic Reopened Message - General
Forum Topic Hidden Message - General
Forum Topic Unhidden Message - Giveaway
Created Message - Giveaway
Message - Giveaway
Winners Message - Giveaway
Completed Message - Video
Chat Scheduled Message - Video
Chat Started Message - Video
Chat Ended Message - Video
Chat Participants Invited Message - Web
App Data Message