mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Fix de_json.
This commit is contained in:
parent
d2e7f4d8f2
commit
468a535257
@ -295,7 +295,10 @@ class TeleBot:
|
||||
|
||||
def get_chat_administrators(self, chat_id):
|
||||
result = apihelper.get_chat_administrators(self.token, chat_id)
|
||||
return [[types.ChatMember.de_json(y) for y in x] for x in result]
|
||||
ret = []
|
||||
for r in result:
|
||||
ret.append(types.ChatMember.de_json(r))
|
||||
return ret
|
||||
|
||||
def get_chat_members_count(self, chat_id):
|
||||
result = apihelper.get_chat_members_count(self.token, chat_id)
|
||||
|
@ -727,7 +727,7 @@ class ChatMember(JsonDeserializable):
|
||||
obj = cls.check_json(json_type)
|
||||
user = User.de_json(obj['user'])
|
||||
status = obj['status']
|
||||
return cls(id, user, status)
|
||||
return cls(user, status)
|
||||
|
||||
def __init__(self, user, status):
|
||||
self.user = user
|
||||
|
Loading…
Reference in New Issue
Block a user