How do I get an user's "Display Name" with discord.js?

For example, I want to specify the users in my server who have a specific symbol like a star ★, and if they have this symbol I want to perform an action. if (member.displayName.includes('★')) { ... but when I use displayName it checks the username of the account and not the diplay name. Can anyone help me about this?
7 Replies
d.js toolkit
d.js toolkit13mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
treble/luna
treble/luna13mo ago
update to 13.17
muffin.
muffin.OP13mo ago
will that affect any of my previous code or cause any possible issues?
treble/luna
treble/luna13mo ago
it should not
muffin.
muffin.OP13mo ago
alright thank you! do I just type npm i [email protected] ?
treble/luna
treble/luna13mo ago
npm update should work
muffin.
muffin.OP13mo ago
alright, thanks again! Yes, it worked!
Want results from more Discord servers?
Add your server