Layer 220
MessagesSetBotCallbackAnswer
Set the callback answer to a user button press (bots only)
method
Bots
messages.setBotCallbackAnswer#d58f130a flags:# alert:flags.1?true query_id:long message:flags.0?string url:flags.2?string cache_time:int = Bool;
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| Alert | flags.1?true | Whether to show the message as a popup instead of a toast notification |
| QueryId | long | Query ID |
| Message | flags.0?string | Popup to show |
| Url | flags.2?string | URL to open |
| CacheTime | int | Cache validity |
Returns
BoolPossible Errors
| Code | Type | Description |
|---|---|---|
| 400 | MESSAGE_TOO_LONG | The provided message is too long. |
| 400 | QUERY_ID_INVALID | The query ID is invalid. |
| 400 | URL_INVALID | Invalid URL provided. |
| 400 | USER_BOT_REQUIRED | This method can only be called by a bot. |
Gogram Example
// MessagesSetBotCallbackAnswer - using Params struct result, err := client.MessagesSetBotCallbackAnswer(&tg.MessagesSetBotCallbackAnswerParams{ QueryId: int64(0), CacheTime: 0, // Optional fields: // Alert: true, // Message: "...", // Url: "...", }) if err != nil { // handle error } // result is *tg.Bool