Raises error when chat_id is not set

This commit is contained in:
leandrotoledo 2015-09-04 17:15:44 -03:00
parent 95ecd44c0e
commit 910959b672

View file

@ -146,6 +146,9 @@ class Bot(TelegramObject):
"""
url, data = func(self, *args, **kwargs)
if not kwargs.get('chat_id'):
raise TelegramError('Invalid chat_id.')
if kwargs.get('reply_to_message_id'):
reply_to_message_id = kwargs.get('reply_to_message_id')
data['reply_to_message_id'] = reply_to_message_id