From 3c1c3f96f15330c81bcae7f8a6d470b688dee829 Mon Sep 17 00:00:00 2001 From: x0x8x <5467132+x0x8x@users.noreply.github.com> Date: Fri, 4 Dec 2020 16:28:43 +0300 Subject: [PATCH] channelParticipantLeft due to upgrade to Layer 120 channelParticipantLeft#c3c6796b user_id:int = ChannelParticipant; --- telethon/tl/custom/participantpermissions.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/telethon/tl/custom/participantpermissions.py b/telethon/tl/custom/participantpermissions.py index 3b9f864b..a94cf0e4 100644 --- a/telethon/tl/custom/participantpermissions.py +++ b/telethon/tl/custom/participantpermissions.py @@ -79,6 +79,13 @@ class ParticipantPermissions: """ return isinstance(self.participant, types.ChannelParticipantBanned) + @property + def is_left(self): + """ + Whether the user left the chat. + """ + return isinstance(self.participant, types.ChannelParticipantLeft) + @property def add_admins(self): """