Skip to content
Advertisement

Bot Mentions Discord.py

JavaScript

So I want my bot to respond to anyone who @mentions it. It does work as it should, but the only problem it’ll respond to @everyone and @here pings. It’s probably simple and I am overthinking it but I just want to know if there is any way to make the bot respond to messages it’s actually mentioned in, not @everyone or @here pings?

Advertisement

Answer

Check whether the bot’s user id is in the message content. Try the following:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement