MadelineProtoDocs/old_docs/API_docs_v95/constructors/messages_botCallbackAnswer.md

44 lines
1.4 KiB
Markdown
Raw Normal View History

2019-03-29 21:12:30 +01:00
---
title: messages.botCallbackAnswer
2019-12-27 17:48:04 +01:00
description: Callback answer sent by the bot in response to a button press
2019-03-29 21:12:30 +01:00
image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
---
# Constructor: messages.botCallbackAnswer
[Back to constructors index](index.md)
2019-12-27 17:48:04 +01:00
Callback answer sent by the bot in response to a button press
2019-03-29 21:12:30 +01:00
### Attributes:
| Name | Type | Required | Description |
|----------|---------------|----------|-------------|
2019-12-27 17:48:04 +01:00
|alert|[Bool](../types/Bool.md) | Optional|Whether an alert should be shown to the user instead of a toast notification|
|has\_url|[Bool](../types/Bool.md) | Optional|Whether an URL is present|
|native\_ui|[Bool](../types/Bool.md) | Optional|Whether to show games in WebView or in native UI.|
|message|[string](../types/string.md) | Optional|Alert to show|
|url|[string](../types/string.md) | Optional|URL to open|
|cache\_time|[int](../types/int.md) | Yes|For how long should this answer be cached|
2019-03-29 21:12:30 +01:00
### Type: [messages\_BotCallbackAnswer](../types/messages_BotCallbackAnswer.md)
### Example:
```php
$messages_botCallbackAnswer = ['_' => 'messages.botCallbackAnswer', 'alert' => Bool, 'has_url' => Bool, 'native_ui' => Bool, 'message' => 'string', 'url' => 'string', 'cache_time' => int];
```
Or, if you're into Lua:
```lua
messages_botCallbackAnswer={_='messages.botCallbackAnswer', alert=Bool, has_url=Bool, native_ui=Bool, message='string', url='string', cache_time=int}
```