bots.resetBotCommands
Clear bot commands for the specified bot scope and language code
func (c *Client) BotsResetBotCommands(ctx context.Context, request *BotsResetBotCommandsRequest) (bool, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.BotsResetBotCommands(ctx, &tg.BotsResetBotCommandsRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // bool
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Scope | BotCommandScopeClass | yes | Command scope |
LangCode | string | yes | Language code |
Returns
bool
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | LANG_CODE_INVALID | The specified language code is invalid. |
| 400 | USER_BOT_REQUIRED | This method can only be called by a bot. |
References
- Official documentation
- Generated Go reference
- TL definition:
bots.resetBotCommands#3d8de0f9