Check if a username is free and can be assigned to a channel/supergroup
boolFalse#bc799737 = Bool;
boolTrue#997275b5 = Bool;
---functions---
channels.checkUsername#10e6bd2c channel:InputChannel username:string = Bool;
Name | Type | Description |
---|---|---|
channel | InputChannel | The channel/supergroup that will assigned the specified username |
username | string | The username to check |
Code | Type | Description |
---|---|---|
400 | CHANNELS_ADMIN_PUBLIC_TOO_MUCH | You're admin of too many public channels, make some channels private to change the username of this channel. |
400 | CHANNEL_INVALID | The provided channel is invalid. |
400 | CHAT_ID_INVALID | The provided chat id is invalid. |
400 | USERNAME_INVALID | The provided username is not valid. |
How to handle channels, supergroups, gigagroups, basic groups, and what's the difference between them.