GramIO API Reference / @gramio/contexts/dist / Update
Class: Update
Defined in: contexts/index.d.ts:4615
This object represents an incoming update.
At most one of the optional parameters can be present in any given update.
Constructors
Constructor
new Update(
payload):Update
Defined in: contexts/index.d.ts:4617
Parameters
| Parameter | Type |
|---|---|
payload | TelegramUpdate |
Returns
Update
Properties
| Property | Type | Defined in |
|---|---|---|
payload | TelegramUpdate | contexts/index.d.ts:4616 |
Accessors
[toStringTag]
Get Signature
get [toStringTag]():
string
Defined in: contexts/index.d.ts:4619
Returns
string
callbackQuery
Get Signature
get callbackQuery():
CallbackQuery
Defined in: contexts/index.d.ts:4653
New incoming callback query
Returns
channelPost
Get Signature
get channelPost():
Message
Defined in: contexts/index.d.ts:4637
New incoming channel post of any kind — text, photo, sticker, etc.
Returns
chatBoost
Get Signature
get chatBoost():
ChatBoostUpdated
Defined in: contexts/index.d.ts:4681
A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates.
Returns
chatJoinRequest
Get Signature
get chatJoinRequest():
ChatJoinRequest
Defined in: contexts/index.d.ts:4679
A request to join the chat has been sent. The bot must have the can_invite_users administrator right in the chat to receive these updates.
Returns
chatMember
Get Signature
get chatMember():
ChatMemberUpdated
Defined in: contexts/index.d.ts:4677
A chat member's status was updated in a chat.
The bot must be an administrator in the chat and must explicitly specify chat_member in the list of allowed_updates to receive these updates.
Returns
chosenInlineResult
Get Signature
get chosenInlineResult():
ChosenInlineResult
Defined in: contexts/index.d.ts:4651
The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot.
Returns
editedChannelPost
Get Signature
get editedChannelPost():
Message
Defined in: contexts/index.d.ts:4639
New version of a channel post that is known to the bot and was edited
Returns
editedMessage
Get Signature
get editedMessage():
Message
Defined in: contexts/index.d.ts:4635
New version of a message that is known to the bot and was edited
Returns
id
Get Signature
get id():
number
Defined in: contexts/index.d.ts:4629
The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you're using Webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially.
Returns
number
inlineQuery
Get Signature
get inlineQuery():
InlineQuery
Defined in: contexts/index.d.ts:4645
New incoming inline query
Returns
message
Get Signature
get message():
Message
Defined in: contexts/index.d.ts:4633
New incoming message of any kind — text, photo, sticker, etc.
Returns
messageReaction
Get Signature
get messageReaction():
MessageReactionUpdated
Defined in: contexts/index.d.ts:4641
A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly specify message_reaction in the list of allowed_updates to receive these updates. The update isn't received for reactions set by bots.
Returns
messageReactionCount
Get Signature
get messageReactionCount():
MessageReactionCountUpdated
Defined in: contexts/index.d.ts:4643
Reactions to a message with anonymous reactions were changed. The bot must be an administrator in the chat and must explicitly specify message_reaction_count in the list of allowed_updates to receive these updates.
Returns
myChatMember
Get Signature
get myChatMember():
ChatMemberUpdated
Defined in: contexts/index.d.ts:4671
The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user.
Returns
poll
Get Signature
get poll():
Poll
Defined in: contexts/index.d.ts:4664
New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot
Returns
pollAnswer
Get Signature
get pollAnswer():
PollAnswer
Defined in: contexts/index.d.ts:4669
A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.
Returns
preCheckoutQuery
Get Signature
get preCheckoutQuery():
PreCheckoutQuery
Defined in: contexts/index.d.ts:4659
New incoming pre-checkout query. Contains full information about checkout
Returns
removedChatBoost
Get Signature
get removedChatBoost():
ChatBoostRemoved
Defined in: contexts/index.d.ts:4683
A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates.
Returns
shippingQuery
Get Signature
get shippingQuery():
ShippingQuery
Defined in: contexts/index.d.ts:4655
New incoming shipping query. Only for invoices with flexible price