2017-03-11 19:54:51 +01:00
|
|
|
---
|
|
|
|
title: callbackQueryAnswer
|
|
|
|
description: Contains answer of the bot to the callback query
|
|
|
|
---
|
|
|
|
## Constructor: callbackQueryAnswer
|
|
|
|
[Back to constructors index](index.md)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Contains answer of the bot to the callback query
|
|
|
|
|
|
|
|
### Attributes:
|
|
|
|
|
|
|
|
| Name | Type | Required | Description |
|
|
|
|
|----------|:-------------:|:--------:|------------:|
|
|
|
|
|text|[string](../types/string.md) | Yes|Text of the answer|
|
|
|
|
|show\_alert|[Bool](../types/Bool.md) | Yes|If true, an alert should be shown to the user instead of a toast|
|
|
|
|
|url|[string](../types/string.md) | Yes|URL to be open|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### Type: [CallbackQueryAnswer](../types/CallbackQueryAnswer.md)
|
|
|
|
|
|
|
|
|
|
|
|
### Example:
|
|
|
|
|
|
|
|
```
|
2017-07-23 16:33:46 +02:00
|
|
|
$callbackQueryAnswer = ['_' => 'callbackQueryAnswer', 'text' => 'string', 'show_alert' => Bool, 'url' => 'string'];
|
2017-03-11 19:54:51 +01:00
|
|
|
```
|
|
|
|
|
2017-07-23 16:11:02 +02:00
|
|
|
[PWRTelegram](https://pwrtelegram.xyz) json-encoded version:
|
|
|
|
|
|
|
|
```
|
2017-07-23 16:33:46 +02:00
|
|
|
{"_": "callbackQueryAnswer", "text": "string", "show_alert": Bool, "url": "string"}
|
2017-07-23 16:11:02 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
|
2017-03-11 19:54:51 +01:00
|
|
|
Or, if you're into Lua:
|
|
|
|
|
|
|
|
|
|
|
|
```
|
2017-07-23 16:33:46 +02:00
|
|
|
callbackQueryAnswer={_='callbackQueryAnswer', text='string', show_alert=Bool, url='string'}
|
2017-03-11 19:54:51 +01:00
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|