GramIO API Reference / @gramio/contexts/dist / CallbackQuery
Class: CallbackQuery
Defined in: contexts/index.d.ts:3203
This object represents an incoming callback query from a callback button in an inline keyboard. If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present. Exactly one of the fields data or game_short_name will be present.
Extended by
Constructors
Constructor
new CallbackQuery(
payload):CallbackQuery
Defined in: contexts/index.d.ts:3205
Parameters
| Parameter | Type |
|---|---|
payload | TelegramCallbackQuery |
Returns
CallbackQuery
Properties
| Property | Type | Defined in |
|---|---|---|
payload | TelegramCallbackQuery | contexts/index.d.ts:3204 |
Accessors
[toStringTag]
Get Signature
get [toStringTag]():
string
Defined in: contexts/index.d.ts:3207
Returns
string
chatInstance
Get Signature
get chatInstance():
string
Defined in: contexts/index.d.ts:3227
Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.
Returns
string
data
Get Signature
get data():
string
Defined in: contexts/index.d.ts:3232
Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field.
Returns
string
Set Signature
set data(
data):void
Defined in: contexts/index.d.ts:3233
Parameters
| Parameter | Type |
|---|---|
data | string |
Returns
void
from
Get Signature
get from():
User
Defined in: contexts/index.d.ts:3211
Sender
Returns
gameShortName
Get Signature
get gameShortName():
string
Defined in: contexts/index.d.ts:3238
Short name of a Game to be returned, serves as the unique identifier for the game
Returns
string
id
Get Signature
get id():
string
Defined in: contexts/index.d.ts:3209
Unique identifier for this query
Returns
string
inlineMessageId
Get Signature
get inlineMessageId():
string
Defined in: contexts/index.d.ts:3222
Identifier of the message sent via the bot in inline mode, that originated the query.
Returns
string
message
Get Signature
get message():
Message|InaccessibleMessage
Defined in: contexts/index.d.ts:3217
Message sent by the bot with the callback button that originated the query
Returns
senderId
Get Signature
get senderId():
number
Defined in: contexts/index.d.ts:3213
Sender ID
Returns
number