Reputation: 1
So I'm trying to make a bot that sends a message when somebody with a specific user id sends a message, but when I use it, it ends up spamming the message for every other user id, excluding the specific one. Here's my code.
@client.event
async def on_message(message):
if message.author.id != 206883079837450241:
await message.channel.send('example')
Upvotes: 0
Views: 40
Reputation: 2017
Switch the !=
with ==
. !=
passes True only if the message's author is not yours. ==
does the opposite.
Upvotes: 2