mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-02 19:20:09 +03:00
Remove check for InputPeerSelf in edit_admin
This commit is contained in:
parent
07b0583069
commit
177fb4e2e5
|
@ -864,8 +864,6 @@ class ChatMethods:
|
||||||
"""
|
"""
|
||||||
entity = await self.get_input_entity(entity)
|
entity = await self.get_input_entity(entity)
|
||||||
user = await self.get_input_entity(user)
|
user = await self.get_input_entity(user)
|
||||||
if isinstance(user, types.InputPeerSelf):
|
|
||||||
raise ValueError('You cannot admin yourself')
|
|
||||||
|
|
||||||
if not isinstance(user, types.InputPeerUser):
|
if not isinstance(user, types.InputPeerUser):
|
||||||
raise ValueError('You must pass a user entity')
|
raise ValueError('You must pass a user entity')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user