api.answerCallbackQuery()
Sets the result of a callback query; for bots only
Parameters
AnswerCallbackQueryParams
:chevron_leftchevron_right
Parameters
Interface
Name | Type | Description |
---|---|---|
callbackQueryId | string | Identifier of the callback query |
text | string | Text of the answer |
showAlert | boolean | If true, an alert must be shown to the user instead of a toast notification |
url | string | URL to be opened |
cacheTime | number | Time during which the result of the query can be cached, in seconds |
Returns
ApiResponse
interface:interface ApiResponse {
_: 'answerCallbackQuery' | 'error'
airgram: Airgram
request: {
method: 'answerCallbackQuery'
params: AnswerCallbackQueryParams
}
response: |
setState: (nextState: Record<string, unknown>) => void
getState: () => Record<string, unknown>
}