mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-25 11:28:05 +00:00
Fix set_chat_description not working anymore with the new Layer
This commit is contained in:
parent
0d5724164c
commit
1e635f00ea
@ -47,15 +47,13 @@ class SetChatDescription(BaseClient):
|
|||||||
"""
|
"""
|
||||||
peer = self.resolve_peer(chat_id)
|
peer = self.resolve_peer(chat_id)
|
||||||
|
|
||||||
if isinstance(peer, types.InputPeerChannel):
|
if isinstance(peer, (types.InputPeerChannel, types.InputPeerChat)):
|
||||||
self.send(
|
self.send(
|
||||||
functions.channels.EditAbout(
|
functions.messages.EditChatAbout(
|
||||||
channel=peer,
|
peer=peer,
|
||||||
about=description
|
about=description
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
elif isinstance(peer, types.InputPeerChat):
|
|
||||||
raise ValueError("The chat_id \"{}\" belongs to a basic group".format(chat_id))
|
|
||||||
else:
|
else:
|
||||||
raise ValueError("The chat_id \"{}\" belongs to a user".format(chat_id))
|
raise ValueError("The chat_id \"{}\" belongs to a user".format(chat_id))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user