check_bot_username()

async Client.check_bot_username()

Checks whether a username can be set for a new bot or as an additional username.

Usable by Users Bots
Parameters:
  • username (str) – Username to be checked.

  • additional (bool, optional) – Pass True to check if the username is available as an additional username for an existing bot.

Returns:

bool – True if the username can be used.