Normalize your data, melón...
This commit is contained in:
parent
f33be4be9a
commit
5d9b486539
1 changed files with 3 additions and 3 deletions
6
main.py
6
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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue