From a409fc511dcf1a3555c42e69de419bc3be7ed4d8 Mon Sep 17 00:00:00 2001 From: leandrotoledo Date: Mon, 7 Sep 2015 15:53:43 -0300 Subject: [PATCH] Improve raise of empty chat_id --- telegram/bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telegram/bot.py b/telegram/bot.py index 2df5b115f..5b1033009 100644 --- a/telegram/bot.py +++ b/telegram/bot.py @@ -138,7 +138,7 @@ class Bot(TelegramObject): """ url, data = func(self, *args, **kwargs) - if not kwargs.get('chat_id'): + if not data.get('chat_id'): raise TelegramError('Invalid chat_id.') if kwargs.get('reply_to_message_id'):