answerCallbackQuery

Answer a callback query. Bot-only.

Parameters

id: string

ID of the callback query to answer.

text?: string

A text to be shown to the user.

alert?: boolean

Whether to show the text as an alert (popup).

url?: string

A URL to be opened.

cacheTime?: number

TTL of answer caches in seconds.

Result

void

Syntax

// Required parameters only.
await client.answerCallbackQuery(id);

// Required parameters + optional parameters.
// Any of the optional parameters can be omitted.
await client.answerCallbackQuery(id, {
    text,
    alert,
    url,
    cacheTime,
});