Interaction

How am I able to fetch the display name of a user in the interaction guild? I tried interaction.member.guild.name but it is returning the guild name only.
.setAuthor({name: `${interaction.member.guild.username}`, iconURL: interaction.user.displayAvatarURL()})
.setAuthor({name: `${interaction.member.guild.username}`, iconURL: interaction.user.displayAvatarURL()})
10 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 staff
d.js docs
d.js docs7mo ago
:property: GuildMember#displayName @14.15.2 The nickname of this member, or their user display name if they don't have one
taer
taerOP7mo ago
do i access this with interaction.member.displayName?
duck
duck7mo ago
yes
taer
taerOP7mo ago
it only returns my actual displayname, i want the guilds displayname in case i used a verification bot do I use interaction.guild.displayName in that instance
monbrey
monbrey7mo ago
I dont understand what you're asking interaction.member is the GuildMember instance of that person in that guild
taer
taerOP7mo ago
the displayName on the guild, not the user's displayName, i.e
No description
taer
taerOP7mo ago
server nickname *
monbrey
monbrey7mo ago
There is only displayName, which will be their nickname if they have one, or their global display name if they have one, or their username Yeah, so its what duck said Or interaction.member.nickname which will be their nickname, or null, no fallbacks
taer
taerOP7mo ago
Thank you all
Want results from more Discord servers?
Add your server