Fix Bot.to_dict to use proper first_name (#1525)

Fixes #1519
This commit is contained in:
Noah Evans 2019-10-11 15:37:28 -04:00 committed by Noam Meltzer
parent 1d007b1b60
commit 2cc9aac7dc

View file

@ -3439,7 +3439,7 @@ class Bot(TelegramObject):
return Poll.de_json(result, self)
def to_dict(self):
data = {'id': self.id, 'username': self.username, 'first_name': self.username}
data = {'id': self.id, 'username': self.username, 'first_name': self.first_name}
if self.last_name:
data['last_name'] = self.last_name