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