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

Merge pull request #336 from i32ropie/master

Added language code for users
This commit is contained in:
FrankWang 2017-05-19 10:04:30 +08:00 committed by GitHub
commit 791a183af5

View File

@ -168,13 +168,15 @@ class User(JsonDeserializable):
first_name = obj['first_name']
last_name = obj.get('last_name')
username = obj.get('username')
return cls(id, first_name, last_name, username)
language_code = obj.get('language_code')
return cls(id, first_name, last_name, username, language_code)
def __init__(self, id, first_name, last_name=None, username=None):
def __init__(self, id, first_name, last_name=None, username=None, language_code=None):
self.id = id
self.first_name = first_name
self.username = username
self.last_name = last_name
self.language_code = language_code
class GroupChat(JsonDeserializable):