From 16f697039a41591167893f7b63347734fbe7d00f Mon Sep 17 00:00:00 2001 From: Jonas Leder Date: Thu, 2 Apr 2020 20:45:34 +0200 Subject: [PATCH] react on hi @bot and @bot hi --- bot.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bot.py b/bot.py index b5beeb0..f28d243 100644 --- a/bot.py +++ b/bot.py @@ -49,6 +49,9 @@ async def on_message(message):#this will run on every message if message.content.startswith(prefix): #check if the message starts with the prefix, if yes process the command await bot.process_commands(message) + if "<@!" + str(bot.user.id) + ">" in message.content: + if (message.content[:3] == "hi ") or (message.content[-3:] == " hi"): + await message.channel.send("Hello <@!" + str(message.author.id) + "> To get a list of my commands enter " + prefix + "help.") @bot.event async def on_raw_reaction_add(message): #this runs on every reaction