0

I'm very new to programming, but managed to get a very trivial fun bot working for a discord server. It listens to commands such as help and 8ball, but I also wanted it to respond to certain messages.

When I try to make the bot send a message after a specific message has been detected, it works, but all other functions stop working. When I remove the code for the reply function, everything works again. I assume it has something to do with the if statement and that it might need something like a return of pass, but I can't figure it out.

@client.event
async def on_message(message):
    if 'bad' in message.content.lower():
        if 'bot' in message.content.lower():
            await message.channel.send('testmessage1')

    if 'good' in message.content.lower():
        if 'bot' in message.content.lower():
            await message.channel.send('testmessage2')    

Thanks in advance!

Jimmy
  • 1

0 Answers0