Layer 227
method Users
bots.checkUsername#87f2219b username:string = Bool;

Parameters

Name Type Description
Username string Username to check; only letters, digits and underscores are allowed, must end in bot, and the full username must be 5–32 characters long

Returns

Bool

Gogram Example

// BotsCheckUsername - positional arguments
result, err := client.BotsCheckUsername("Hello, World!")
if err != nil {
    // handle error
}
// result is *tg.Bool

Possible Errors

Code Type Description
400 USERNAME_INVALID The provided username is not valid.
400 USERNAME_OCCUPIED The provided username is already occupied.
400 USERNAME_SUFFIX_MISSING The required bot suffix is missing from the passed username.