diff --git a/telegram/bot.py b/telegram/bot.py index 502c35b39..b09907c91 100644 --- a/telegram/bot.py +++ b/telegram/bot.py @@ -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