From 5d9b486539875469e02de4600b67daae16f4ef11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Carlos=20Cuevas?= Date: Thu, 18 May 2017 23:42:06 +0200 Subject: [PATCH] =?UTF-8?q?Normalize=20your=20data,=20mel=C3=B3n...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index fb91667..53e8268 100644 --- a/main.py +++ b/main.py @@ -52,15 +52,15 @@ def randomchat(bot, update): reply = analyze(msg) else: - reply = chatbot.get_response(msg) + statement = chatbot.get_response(msg) + reply = statement.text if "te rieh" in msg or random.randint(0, 100) < 5: if "te rieh" in reply.text: - reply = reply.text reply = reply.replace("te rieh", user_name) else: - reply = user_name + ": " + reply.text + reply = user_name + ": " + reply bot.sendMessage(update.message.chat_id, text=reply)