Layer 220
BotsSetBotMenuButton
Sets the menu button action for a given user or for all users
method
Bots
bots.setBotMenuButton#4504d54f user_id:InputUser button:BotMenuButton = Bool;
Parameters
| Name | Type | Description |
|---|---|---|
| UserId | InputUser | User ID |
| Button | BotMenuButton | Bot menu button action |
Returns
BoolPossible Errors
| Code | Type | Description |
|---|---|---|
| 400 | BUTTON_INVALID | The specified button is invalid. |
| 400 | BUTTON_TEXT_INVALID | The specified button text is invalid. |
| 400 | BUTTON_URL_INVALID | Button URL invalid. |
| 400 | USER_BOT_REQUIRED | This method can only be called by a bot. |
Gogram Example
// BotsSetBotMenuButton - positional arguments result, err := client.BotsSetBotMenuButton(&tg.InputUserSelf{}, &tg.BotMenuButton{}) if err != nil { // handle error } // result is *tg.Bool