diff options
| -rw-r--r-- | velascobot2/bot.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/velascobot2/bot.py b/velascobot2/bot.py index 9659a8d..d8cc467 100644 --- a/velascobot2/bot.py +++ b/velascobot2/bot.py @@ -458,7 +458,8 @@ class Bot: response, content = self.messenger.give_response(chat_id) await self.send(chat_id, response, content, **kwargs) while random.random() <= self.messenger.repeat: - del kwargs["reply_to_message_id"] + if "reply_to_message_id" in kwargs: + del kwargs["reply_to_message_id"] response, content = self.messenger.give_response(chat_id) await self.send(chat_id, response, content, **kwargs) # Consider any Network Error as a Telegram temporary ban, as I |
