HTML rendering of richMessage, or undefined if the message is not rich.
Markdown rendering of richMessage, or undefined if the message is not rich.
Plain-text rendering of richMessage, or undefined if the message is not rich.
StaticfromStaticinitStaticinitOptionalcondition: FunctionOptionalinputChat: EntityLikeReturns the input peer of the bot that's needed for the reply markup.
This is necessary for InlineButtonTypeSwitchInline since we need
to know what bot we want to start. Raises Error if the bot
cannot be found but is needed. Returns None if it's not needed.
Helper methods to set the buttons given the input sender and chat.
Optionalbot: EntityLikeOptionalparams: Omit<ForwardMessagesParams, "dropAuthor" | "fromPeer" | "messages">Optionalparams: DownloadMediaInterfaceEnsures the full rich message content is available. When the server
truncated the delivery (richMessage.part), fetches the rest via
messages.getRichMessage and updates this message in place.
This message with complete richMessage content.
Optionalparams: Omit<ForwardMessagesParams, "fromPeer" | "messages">Returns buttons when that property fails (this is rarely needed).
Optionalcls: FunctionOptionallimit: numberOptionalreaction: string | TypeReactionOptionaloffset: stringOptionalparams: MarkAsReadParamsOptionalparams: UpdatePinMessageParamsOptionalreaction: string | BigInteger | TypeReaction | (string | BigInteger | TypeReaction)[]Optionalbig: booleanOptionaladdToRecent: booleanOptionalparams: UpdatePinMessageParamsStaticCONSTRUCTOR_StaticSUBCLASS_Optional_Optional_Optional_Optional_Optional_The message action object of the message for Api.MessageService
instances, which will be undefined for other types of messages.
The timestamp indicating when this message was sent. This will always be present except for empty messages.
OptionaleditThe date when this message was last edited.
OptionaleditWhether the edited mark of this message is edited should be hidden (e.g. in GUI clients) or shown.
OptionalentitiesThe list of markup entities in this message, such as bold, italics, code, hyperlinks, etc.
OptionalforwardsThe number of times this message has been forwarded.
OptionalfromThe peer who sent this message, which is either
Api.PeerUser, Api.PeerChat or Api.PeerChannel.
This value will be undefined for anonymous messages.
OptionalfromWhether this message was originated from a previously-scheduled message or not.
OptionalfwdThe original forward header if this message is a forward.
You should probably use the forward property instead.
OptionalgroupedIf this message belongs to a group of messages (photo albums or video albums), all of them will have the same value here.
The ID of this message. This field is always present.
Any other member is optional and may be undefined.
OptionallegacyWhether this is a legacy message or not.
OptionalmediaThe media sent with this message if any (such as photos, videos, documents, gifs, stickers, etc.).
You may want to access the photo, document etc. properties instead.
If the media was not present or it was Api.MessageMediaEmpty,
this member will instead be undefined for convenience.
OptionalmediaWhether you have read the media in this message or not, e.g. listened to the voice note media.
OptionalmentionedWhether you were mentioned in this message or not. Note that replies to your own messages also count as mentions.
The string text of the message for Api.Message instances,
which will be undefined for other types of messages.
OptionalnoforwardsOptionaloutWhether the message is outgoing (i.e. you sent it from
another session) or incoming (i.e. someone else sent it).
Note that messages in your own chat are always incoming,
but this member will be true if you send a message
to your own chat. Messages you forward to your chat are
not considered outgoing, just like official clients
display them.
OptionalpatternThe peer to which this message was sent, which is either Api.PeerUser, Api.PeerChat or Api.PeerChannel. This will always be present except for empty messages.
OptionalpinnedWhether this message is currently pinned or not.
OptionalpostWhether this message is a post in a broadcast channel or not.
OptionalpostThe display name of the message sender to show in messages sent to broadcast channels.
OptionalreactionsOptionalrepliesThe number of times another message has replied to this message.
OptionalreplyThe reply markup for this message (which was sent either via a bot or by a bot).
You probably want to access buttons instead.
OptionalreplyThe original reply header if this message is replying to another.
OptionalrestrictionAn optional list of reasons why this message was restricted.
If the list is undefined, this message has not been restricted.
OptionalrichRich message content: a PageBlock tree with tables,
headings, lists and inline media. When its part flag is set, the
delivery was truncated — use fetchRichMessage to load the rest.
OptionalsilentWhether the message should notify people with sound or not. Previously used in channels, but since 9 August 2019, it can also be in private chats
OptionalttlThe Time To Live period configured for this message. The message should be erased from wherever it's stored (memory, a local database, etc.) when this threshold is met.
OptionalviaThe ID of the bot used to send this message through its inline mode (e.g. "via @like").
OptionalviewsThe number of views this message from a broadcast channel has. This is also present in forwards.
Returns a list of lists of
MessageButton <MessageButton>, if any. Otherwise, it returnsundefined.