mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
Fix set_chat_description not working anymore with the new Layer
This commit is contained in:
parent
0d5724164c
commit
1e635f00ea
1 changed files with 3 additions and 5 deletions
|
|
@ -47,15 +47,13 @@ class SetChatDescription(BaseClient):
|
|||
"""
|
||||
peer = self.resolve_peer(chat_id)
|
||||
|
||||
if isinstance(peer, types.InputPeerChannel):
|
||||
if isinstance(peer, (types.InputPeerChannel, types.InputPeerChat)):
|
||||
self.send(
|
||||
functions.channels.EditAbout(
|
||||
channel=peer,
|
||||
functions.messages.EditChatAbout(
|
||||
peer=peer,
|
||||
about=description
|
||||
)
|
||||
)
|
||||
elif isinstance(peer, types.InputPeerChat):
|
||||
raise ValueError("The chat_id \"{}\" belongs to a basic group".format(chat_id))
|
||||
else:
|
||||
raise ValueError("The chat_id \"{}\" belongs to a user".format(chat_id))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue