toggle_bot_username()

async Client.toggle_bot_username()

Activate or deactivate a purchased fragment.com username associated to a bot we own.

Usable by Users Bots
Parameters:
  • bot (int | str) – Unique identifier (int) or username (str) of the target bot.

  • username (str) – The username to toggle.

  • active (bool) – Whether to activate (True) or deactivate (False) the username.

Returns:

bool – On success, True is returned.

Example

await app.toggle_bot_username("my_bot", "cool_bot", True)