0
votes

Is there a way to detect when a user (not the bot itself) has sent a message? I understand that the on_message event allows comparisons to an expected command/ response (https://discordpy.readthedocs.io/en/latest/api.html) but for my project, there is no set user response. This makes it so the bot triggers everytime it detects it's own message. How can I fix that?

1

1 Answers

2
votes

try this

client = discord.Client()
@bot.event
async def on_message(message):
    if message.author == client.user:
        return
    #then write the code down here so if the person who send message is bot it wont count