Data about the message
Optional
animationMessage is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set
Optional
audioMessage is an audio file, information about the file
Optional
authorSender 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
Optional
authorTrue, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message
Optional
authorSignature of the post author for messages in channels, or the custom title of an anonymous group administrator
Optional
autoService message: auto-delete timer settings changed in the chat
Optional
automaticTrue, if the message is a channel post that was automatically forwarded to the connected discussion group
Optional
boostService message: user boosted the chat
Optional
businessUnique 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
Optional
captionCaption for the animation, audio, document, photo, video or voice
Optional
captionFor messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption
Optional
channelService 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
Optional
chatSender 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.
Optional
chatService message: chat background set
Optional
chatService message: a chat was shared with the bot
Optional
connectedThe domain name of the website on which the user has logged in. More about Telegram Login
Optional
contactMessage is a shared contact, information about the contact
Optional
contentFor text messages, the actual UTF-8 text of the message
Date the message was sent in Unix time. It is always a positive number, representing a valid date
Optional
deleteService message: the chat photo was deleted
Optional
diceMessage is a dice with random value
Optional
documentMessage is a general file, information about the file
Optional
editedDate the message was last edited in Unix time
Optional
effectUnique identifier of the message effect added to the message
Optional
entitiesFor text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text
Optional
externalInformation about the message that is being replied to, which may come from another chat or forum topic
Optional
forumIf the message is sent to a forum topic
Optional
forumService message: forum topic closed
Optional
forumService message: forum topic created
Optional
forumService message: forum topic edited
Optional
forumService message: forum topic reopened
Optional
forwardInformation about the original message for forwarded messages
Optional
gameMessage is a game, information about the game. More about games
Optional
generalService message: the 'General' forum topic hidden
Optional
generalService message: the 'General' forum topic unhidden
Optional
giveawayThe message is a scheduled giveaway message
Optional
giveawayService message: a giveaway without public winners was completed
Optional
giveawayService message: a scheduled giveaway was created
Optional
starOptional
giveawayA giveaway with public winners was completed
Optional
groupService message: the group has been created
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
Optional
inTrue, if the message is sent to a forum topic
Optional
leftA member was removed from the group, information about them (this member may be the bot itself)
Optional
linkOptions used for link preview generation for the message, if it is a text message and link preview options were changed
Optional
locationMessage is a shared location, information about the location
Optional
memberMember that were added to the message group or supergroup and information about them
Optional
migrateThe supergroup has been migrated from a group with the specified identifier
Optional
newNew members that were added to the group or supergroup and information about them (the bot itself may be one of these members)
Optional
newA chat photo was change to this value
Optional
newA chat title was changed to this value
Optional
originalFor 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
Optional
paidMessage contains paid media; information about the paid media
Optional
passportTelegram Passport data
Optional
photoMessage is a photo, available sizes of the photo
Optional
pollMessage is a native poll, information about the poll
Optional
protectedTrue, if the message can't be forwarded
Optional
proximityService message. A user in the chat triggered another user's proximity alert while sharing Live Location
Optional
quoteFor replies that quote part of the original message, the quoted part of the message
Optional
refundedMessage is a service message about a refunded payment, information about the payment. More about payments
Optional
senderIf the sender of the message boosted the chat, the number of boosts added by the user
Optional
senderThe 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.
Optional
senderChat that sent the message originally
Optional
showTrue, if the caption must be shown above the message media
Optional
stickerMessage is a sticker, information about the sticker
Optional
storyFor replies to a story, the original message
Optional
successfulMessage is a service message about a successful payment, information about the payment. More about payments
Optional
supergroupService 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
Optional
threadUnique identifier of a message thread or a forum topic to which the message belongs; for supergroups only
Optional
usersService message: users were shared with the bot
Optional
venueMessage is a venue, information about the venue
Optional
viaBot through which the message was sent
Optional
videoMessage is a video, information about the video
Optional
videoService message: video chat ended
Optional
videoService message: new participants invited to a video chat
Optional
videoService message: video chat scheduled
Optional
videoService message: video chat started
Optional
videoMessage is a video note, information about the video message
Optional
voiceMessage is a voice message, information about the file
Optional
webService message: data sent by a Web App
Optional
writeService 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
Optional
appOptional
authorOptional
authorThe client that instantiated this
Date the message was sent. It is always a positive number, representing a valid date
Return the timestamp message was sent, in milliseconds
Date the message was last edited
Return the timestamp message was last edited, in milliseconds
Protected
_cloneProtected
_updateOptional
options: ICollectorOptions<string, Message>message collector options
Optional
options: ICollectorOptions<string, Message> & { message collector options
Optional
options: ICollectorOptions<string, MessageReactionUpdated>reaction collector options
Optional
options: ICollectorOptions<string, MessageReactionUpdated> & { reaction collector options
Use this method to copy messages of any kind. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Optional
options: Omit<{ out parameters
Returns the message id of the sent message on success.
Optional
options: ICollectorOptions<string, Message>message collector options
Optional
options: ICollectorOptions<string, CallbackQuery>inline keyboard collector options
Optional
options: ICollectorOptions<string, MessageReactionUpdated>reaction collector options
Use this method to delete a message, including service messages, with the following limitations:
Returns True on success.
Use this method to edit text and game messages.
New text of the message, 1-4096 characters after entities parsing
Optional
options: Omit<{ out parameters
On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.
Use this method to edit captions of messages.
Optional
caption: stringNew caption of the message, 0-1024 characters after entities parsing
Optional
options: Omit<{ out parameters
On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.
Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation.
Latitude of new location
Longitude of new location
Optional
options: Omit<{ out parameters
On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
Use this method to edit animation, audio, document, photo, video messages or to add media to text messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL.
An object for a new media content of the message
Optional
options: Omit<{ out parameters
On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.
Use this method to edit only the reply markup of messages.
An object for an inline keyboard
Optional
options: Omit<{ out parameters
On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.
Use this method to forward messages of any kind. Service messages and messages with protected content can't be forwarded.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Optional
options: Omit<{ out parameters
On success, the sent Message is returned.
Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in a supergroup or 'can_edit_messages' admin right in a channel.
Optional
options: { options for pinned message
Optional
businessUnique identifier of the business connection on behalf of which the message will be pinned
Optional
notification?: booleanPass True if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats
Returns True on success.
Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. In albums, bots must react to the first message.
A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators. Paid reactions can't be used by bots
Optional
isBig: booleanPass True to set the reaction with a big animation
Returns True on success.
Reply to the current message
Text of the message to be sent, 1-4096 characters after entities parsing
Optional
options: Omit<{ out parameters
On success, the sent Message is returned.
Use this method to stop updating a live location message before live_period expires.
Optional
options: Omit<{ out parameters
On success, if the message is not an inline message, the edited Message is returned, otherwise True is returned.
Flatten an object. Any properties that are collections will get converted to an array of keys.
Optional
propsRecursive: booleanOptional. If true, calls toJSON method on nested objects.
Rest
...props: Record<string, string | boolean>[]Optional. Specific properties to include/exclude, or rename.
Flattened object.
Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in a supergroup or 'can_edit_messages' admin right in a channel.
Optional
businessConnectionId: stringUnique identifier of the business connection on behalf of which the message will be unpinned
Returns True on success.
The client that instantiated this