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.
Note
In regular groups (non-supergroups), this method will only work if the “All Members Are Admins” setting is off.
- Parameters
chat_id (
int|str) – Unique identifier (int) or username (str) of the target chat.title (
str) – New chat title, 1-255 characters.
- Returns
bool– True on success.- Raises
ValueError – In case a chat id belongs to user.
Example
app.set_chat_title(chat_id, "New Title")