Skip to content

Commit c18cf81

Browse files
authored
Remove "All Members Are Admins" Note
1 parent 7a95c87 commit c18cf81

1 file changed

Lines changed: 4 additions & 17 deletions

File tree

pyrogram/methods/chats/set_chat_title.py

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,13 @@
2424

2525
class SetChatTitle:
2626
async def set_chat_title(
27-
self: "pyrogram.Client",
28-
chat_id: Union[int, str],
29-
title: str
27+
self: "pyrogram.Client", chat_id: Union[int, str], title: str
3028
) -> "types.Message":
3129
"""Change the title of a chat.
32-
30+
3331
Titles can't be changed for private chats.
3432
You must be an administrator in the chat for this to work and must have the appropriate admin rights.
3533
36-
.. note::
37-
38-
In regular groups (non-supergroups), this method will only work if the "All Members Are Admins"
39-
setting is off.
40-
4134
.. include:: /_includes/usable-by/users-bots.rst
4235
4336
Parameters:
@@ -62,17 +55,11 @@ async def set_chat_title(
6255

6356
if isinstance(peer, raw.types.InputPeerChat):
6457
r = await self.invoke(
65-
raw.functions.messages.EditChatTitle(
66-
chat_id=peer.chat_id,
67-
title=title
68-
)
58+
raw.functions.messages.EditChatTitle(chat_id=peer.chat_id, title=title)
6959
)
7060
elif isinstance(peer, raw.types.InputPeerChannel):
7161
r = await self.invoke(
72-
raw.functions.channels.EditTitle(
73-
channel=peer,
74-
title=title
75-
)
62+
raw.functions.channels.EditTitle(channel=peer, title=title)
7663
)
7764
else:
7865
raise ValueError(f'The chat_id "{chat_id}" belongs to a user')

0 commit comments

Comments
 (0)