Skip to content

checkChatUsername

Sahri Riza Umami edited this page Jun 23, 2018 · 1 revision

Checks whether a username can be set for a chat.

checkChatUsername(chat_id, username, callback, data)
Field Type Description
chat_id int32 Chat identifier; should be identifier of a supergroup chat, or a channel chat, or a private chat with self, or zero if chat is being created.
username string Username to be checked.

Example

  • Checks whether "pegelinux" can be set for chat 1234567890 username.

    checkChatUsername(1234567890, 'pegelinux')

    Response:

    {
      ["@type"] = "checkChatUsernameResultUsernameOccupied"
    }

Frequently Asked Questions
The Functions

Clone this wiki locally