Skip to main content

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

NameTypeRequiredDescription
ScopeBotCommandScopeClassyesCommand scope
LangCodestringyesLanguage code

Returns

bool

Possible errors

CodeTypeDescription
400LANG_CODE_INVALIDThe specified language code is invalid.
400USER_BOT_REQUIREDThis method can only be called by a bot.

References