This is the code:
async def on_message(message):
if client.user.mentioned_in(message):
await message.channel.send("Hey!")
@client.event
async def on_message(message):
if message.author == client.user:
return
if "$example" in message.content:
if message.author.id == int(discord id here):
await message.channel.send("Hi Name")
if message.author.id == int(discord id here):
await message.channel.send("Hi Name2")
So, my issue is if I have the second piece of code in, my first piece of code doesn't work. No error messages, nothing it just doesn't seem to exist. I'm assuming it would also be the same vice versa. My question is: I'd like to know what's causing this and how I should go about fixing it. Is my code incorrect? Am I missing something? Or should I be defining one of them as something else? I'm stuck. Thanks in advance.