Layer 220
method Users
bots.toggleUsername#53ca973 bot:InputUser username:string active:Bool = Bool;

Parameters

Name Type Description
Bot InputUser The bot
Username string Username
Active Bool Whether to activate or deactivate it

Returns

Bool

Possible Errors

Code Type Description
400 BOT_INVALID This is not a valid bot.
400 USERNAME_NOT_MODIFIED The username was not modified.

Gogram Example

// BotsToggleUsername - positional arguments
result, err := client.BotsToggleUsername(&tg.InputUserSelf{}, "...", true)
if err != nil {
    // handle error
}
// result is *tg.Bool