added an easier way to get frequent commands from message.

This commit is contained in:
mattijn 2015-09-07 04:55:00 +02:00
parent 5b8f41b3c1
commit 69aa1c252b

View file

@ -171,6 +171,12 @@ class Message(TelegramObject):
return Message(**data)
def __getitem__(self, item):
if item in self.__dict__.keys():
return self.__dict__[item]
elif item == 'chat_id':
return self.chat.id
def to_dict(self):
"""
Returns: