set_chat_title()

Client.set_chat_title()

Change the title of a chat.

Titles can’t be changed for private chats. You must be an administrator in the chat for this to work and must have the appropriate admin rights.

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

  • title (str) – New chat title, 1-255 characters.

Returns:

Message – On success, the sent service message is returned.

Raises:

ValueError – In case a chat id belongs to user.

Example

await app.set_chat_title(chat_id, "New Title")