From 186450d1c763f20a894cf89c2382fcd736003c10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Sat, 18 May 2019 14:33:06 +0200 Subject: [PATCH] liven up the rejection replies --- delojza.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/delojza.py b/delojza.py index 32bbd35..07f7910 100755 --- a/delojza.py +++ b/delojza.py @@ -265,7 +265,10 @@ class DelojzaBot: if message.chat.title not in self.protected_chats: self.logger.info("Ignoring {} in chat {} due to protected hashtags: {}..." .format(urls, message.chat.title, hashtags)) - message.reply_text(choice(["No.", "Nein", "Nope", ":(", "Error: Cannot.", "Fail."])) + replies = ["Nein", "Nope", ":(", "Error: Cannot.", + "Error: {}".format(self.markov.make_sentence() if self.markov else "Cannot."), + "Failed: {}".format(self.markov.make_sentence() if self.markov else "Cannot.")] + message.reply_text(choice(replies)) return self.last_hashtags = None