1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Merge pull request #238 from Kondra007/patch-6

Added "all_members_are_administrators" field to Chat object
This commit is contained in:
FrankWang 2016-10-12 12:01:46 +08:00 committed by GitHub
commit d53a881ac4

View File

@ -161,15 +161,17 @@ class Chat(JsonDeserializable):
username = obj.get('username') username = obj.get('username')
first_name = obj.get('first_name') first_name = obj.get('first_name')
last_name = obj.get('last_name') last_name = obj.get('last_name')
return cls(id, type, title, username, first_name, last_name) all_members_are_administrators = obj.get('all_members_are_administrators')
return cls(id, type, title, username, first_name, last_name, all_members_are_administrators)
def __init__(self, id, type, title=None, username=None, first_name=None, last_name=None): def __init__(self, id, type, title=None, username=None, first_name=None, last_name=None, all_members_are_administrators=None):
self.type = type self.type = type
self.last_name = last_name self.last_name = last_name
self.first_name = first_name self.first_name = first_name
self.username = username self.username = username
self.id = id self.id = id
self.title = title self.title = title
self.all_members_are_administrators = all_members_are_administrators
class Message(JsonDeserializable): class Message(JsonDeserializable):