CallbackQuery

data class CallbackQuery(id: String, from: User, message: Message?, inlineMessageId: String?, chatInstance: String, data: String?, gameShortName: String?)

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. NOTE: After the user presses a callback button, Telegram clients will display a progress bar until you call answerCallbackQuery. It is, therefore, necessary to react by calling answerCallbackQuery even if no notification to the user is needed (e.g., without specifying any of the optional parameters).

Parameters

id

Unique identifier for this query

from

Sender

message

Optional. Message with the callback button that originated the query. Note that message content and message date will not be available if the message is too old

inlineMessageId

Optional. Identifier of the message sent via the bot in inline mode, that originated the query.

chatInstance

Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.

data

Optional. Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field.

gameShortName

Optional. Short name of a Game to be returned, serves as the unique identifier for the game

Constructors

CallbackQuery
Link copied to clipboard
common
fun CallbackQuery(id: String, from: User, message: Message? = null, inlineMessageId: String? = null, chatInstance: String, data: String? = null, gameShortName: String? = null)
Unique identifier for this query

Functions

component1
Link copied to clipboard
common
operator fun component1(): String
component2
Link copied to clipboard
common
operator fun component2(): User
component3
Link copied to clipboard
common
operator fun component3(): Message?
component4
Link copied to clipboard
common
operator fun component4(): String?
component5
Link copied to clipboard
common
operator fun component5(): String
component6
Link copied to clipboard
common
operator fun component6(): String?
component7
Link copied to clipboard
common
operator fun component7(): String?
copy
Link copied to clipboard
common
fun copy(id: String, from: User, message: Message? = null, inlineMessageId: String? = null, chatInstance: String, data: String? = null, gameShortName: String? = null): CallbackQuery
equals
Link copied to clipboard
common
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open override fun hashCode(): Int
toString
Link copied to clipboard
common
open override fun toString(): String

Properties

chatInstance
Link copied to clipboard
common
val chatInstance: String
Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent.
data
Link copied to clipboard
common
val data: String? = null
Optional.
from
Link copied to clipboard
common
val from: User
Sender
gameShortName
Link copied to clipboard
common
val gameShortName: String? = null
Optional.
id
Link copied to clipboard
common
val id: String
Unique identifier for this query
inlineMessageId
Link copied to clipboard
common
val inlineMessageId: String? = null
Optional.
message
Link copied to clipboard
common
val message: Message? = null
Optional.