mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-04 11:02:29 +00:00
Fix lack of support for anon channel restrictions (#4130)
This commit is contained in:
@@ -1116,8 +1116,8 @@ class ChatMethods:
|
||||
|
||||
user = await self.get_input_entity(user)
|
||||
ty = helpers._entity_type(user)
|
||||
if ty != helpers._EntityType.USER:
|
||||
raise ValueError('You must pass a user entity')
|
||||
if ty not in (helpers._EntityType.USER, helpers._EntityType.CHANNEL):
|
||||
raise ValueError('You must pass a user or channel entity')
|
||||
|
||||
if isinstance(user, types.InputPeerSelf):
|
||||
raise ValueError('You cannot restrict yourself')
|
||||
|
Reference in New Issue
Block a user