From c7b360e98203b79366301c519127c7377d5f57ae Mon Sep 17 00:00:00 2001 From: SwissCorePy <51398037+SwissCorePy@users.noreply.github.com> Date: Thu, 1 Jul 2021 18:54:39 +0200 Subject: [PATCH] fixed bug --- telebot/types.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/telebot/types.py b/telebot/types.py index 61ac414..cae4909 100644 --- a/telebot/types.py +++ b/telebot/types.py @@ -158,10 +158,9 @@ class ChatMemberUpdated(JsonDeserializable): """ old: Dict = self.old_chat_member.__dict__ new: Dict = self.new_chat_member.__dict__ - old.pop('user') # User should always be the same - new.pop('user') # No need to include dif = {} for key in new: + if key == 'user': continue if new[key] != old[key]: dif[key] = [old[key], new[key]] return dif