Interface ToggleBotUsernameIsActive

Changes active state for a username of a bot. The editable username can't be disabled. May return an error with a message "USERNAMES_ACTIVE_TOO_MUCH" if the maximum number of active usernames has been reached. Can be called only if userTypeBot.can_be_edited == true. Request type for Tdjson#toggleBotUsernameIsActive.

interface ToggleBotUsernameIsActive {
    @type: "toggleBotUsernameIsActive";
    bot_user_id: number;
    is_active?: boolean;
    username: string;
}

Properties

@type: "toggleBotUsernameIsActive"
bot_user_id: number

Identifier of the target bot.

is_active?: boolean

Pass true to activate the username; pass false to disable it.

username: string

The username to change.