mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-26 09:07:43 +01:00
Raises error when chat_id is not set
This commit is contained in:
parent
95ecd44c0e
commit
910959b672
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue