bots.getBotMenuButton
Gets the menu button action for a given user or for all users, previously set using bots.setBotMenuButton; users can see this information in the botInfo constructor.
func (c *Client) BotsGetBotMenuButton(ctx context.Context, userid InputUserClass) (BotMenuButtonClass, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.BotsGetBotMenuButton(ctx, userid)
if err != nil {
return err
}
_ = res // BotMenuButtonClass
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
UserID | InputUserClass | yes | User ID or empty for the default menu button. |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | USER_BOT_REQUIRED | This method can only be called by a bot. |
References
- Official documentation
- Generated Go reference
- TL definition:
bots.getBotMenuButton#9c60eb28