Added ability to reply when named
This commit is contained in:
parent
48a363bb30
commit
78d81159ee
1 changed files with 1 additions and 1 deletions
2
main.py
2
main.py
|
@ -46,7 +46,7 @@ def randomchat(bot, update):
|
|||
user_name = update.message.from_user.username.lower()
|
||||
reply = chatbot.get_response(msg)
|
||||
|
||||
if random.randint(0, 100) < 5:
|
||||
if "te rieh" in msg or random.randint(0, 100) < 5:
|
||||
reply = user_name + ": " + reply
|
||||
bot.sendMessage(update.message.chat_id, text=reply)
|
||||
|
||||
|
|
Loading…
Reference in a new issue