Layer 220
BotsToggleUsername
Activate or deactivate a purchased fragment. com username associated to a bot we own.
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
BoolPossible 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