telegramx.js

CallbackQuery

class

extends Base<T.CallbackQuery>

An incoming callback query from a callback button on an inline keyboard.

Declaration

declare class CallbackQuery extends Base<T.CallbackQuery> 

Properties

authorproperty#
get author(): User;

The user that pressed the button.

dataproperty#
get data(): string | undefined;

Data associated with the button (as set in callback_data).

idproperty#
get id(): string;
messageproperty#
get message(): Message | undefined;

The message the button belongs to, when still accessible.

Methods

answermethod#
answer(options?: AnswerOptions$1): Promise<boolean>;
ParameterType
options?AnswerOptions$1
Returns Promise<boolean>

Answer this callback query. Call with no arguments to simply acknowledge it and stop the loading spinner, or pass { text, show_alert } to show a notification.