Reputation: 17
I know how to check if a message is sent by a bot using if(message.author.bot)
but I want to know if their is a way to find out if they are a bot using their id.
Upvotes: 0
Views: 1343
Reputation: 6730
You can fetch the user then simply check their bot
property.
const userID = 'id-here';
// client = your Discord Client Object
client.users.fetch(userID).then(user => {
console.log(user.bot);
// Will return a boolean
});
Upvotes: 1
Reputation: 304
As far as I know, and from reading the docs, there is no difference between how user and bot IDs are created.
Upvotes: 1