Answers for "discord.js get mentioned user id"

10

discord.js get user by id

client.users.cache.find(user => user.id === 'USER-ID')
Posted by: Guest on October-20-2020
0

discord.js get first mention

let member = msg.members.mentions.first();
if(msg.content === 'name'){
	msg.channel.send(member)
}
Posted by: Guest on August-26-2020
1

check if message mentions users discord js

// 1st Way
if (<Message>.mentions.members.size) { // or message.mentions.members.size > 0
  //DO STUFF
}

// 2nd Way
if (<Message>.mentions.members.first()) {
  //DO STUFF
}
Posted by: Guest on March-20-2020

Code answers related to "discord.js get mentioned user id"

Code answers related to "Javascript"

Browse Popular Code Answers by Language