mirror of
https://gitlab.jonasled.de/jonasled/discordbot
synced 2024-10-21 08:49:30 +02:00
react on hi @bot and @bot hi
This commit is contained in:
parent
ae790d8fc1
commit
16f697039a
1 changed files with 3 additions and 0 deletions
3
bot.py
3
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
|
||||
|
|
Loading…
Reference in a new issue