mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-02 11:10:18 +03:00
replaced return None with error
Co-authored-by: Lonami <totufals@hotmail.com>
This commit is contained in:
parent
603772650e
commit
4baef4de09
|
@ -1184,7 +1184,7 @@ class ChatMethods:
|
||||||
for participant in chat.participants.participants:
|
for participant in chat.participants.participants:
|
||||||
if participant.user_id == user.id:
|
if participant.user_id == user.id:
|
||||||
return custom.ParticipantPermissions(participant.participant, True)
|
return custom.ParticipantPermissions(participant.participant, True)
|
||||||
return None
|
raise errors.UserNotParticipantError(None)
|
||||||
|
|
||||||
raise ValueError('You must pass either a channel or a chat')
|
raise ValueError('You must pass either a channel or a chat')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user