The title explains my question. This question might sound stupid, but how do I detect if the author of a message was a Discord bot?
Thanks.
The most common way to tell if an account is fake is to check out the profile. The most rudimentary bots lack a photo, a link, or any bio. More sophisticated ones might use a photo stolen from the web, or an automatically generated account name. Using human language is still incredibly hard for machines.
Bots Be Able To DM You – Discord.
Writer-Bot is a discord bot for writing-based servers. It has many features, such as writing sprints, word count goals, xp/levels, prompts and random generators. ! ask : Asks you a random question about your character or your world, to get the creative juices flowing.
If you want to check if a message author is a bot account you can easily do:
if(message.author.bot) return;
This will return if a user is a bot. If it isn't will keep going.
If you want to check if the message author is the logged in bot you can do:
if(message.author.id === client.user.id) return;
This is gonna return if the message author is the bot, it will keep going if its another bot.
for those looking for an answer on how to check if it was your bot who added a reaction. In that case you can check like it like:
client.on('messageReactionAdd', (messageReaction, user) => {
if (messageReaction.me === false) {
// This reaction was not added by the bot
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With