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 toolkit7mo 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/luna7mo ago
update to 13.17
muffin.
muffin.7mo ago
will that affect any of my previous code or cause any possible issues?
treble/luna
treble/luna7mo ago
it should not
muffin.
muffin.7mo ago
alright thank you! do I just type npm i discord.js@13.17 ?
treble/luna
treble/luna7mo ago
npm update should work
muffin.
muffin.7mo ago
alright, thanks again! Yes, it worked!