Skip to content

toggleBotUsernameIsActive

Function · TDLib 1.8.67 · d1085f9c

Changes active state for a username of a bot. The editable username can be disabled only if there are other active usernames. 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

toggleBotUsernameIsActive(
  bot_user_id: int53,
  username: string,
  is_active: Bool
) → Ok

bot_user_id

int53

Identifier of the target bot

username

string

The username to change

is_active

Bool

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