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 toolkit2mo 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 docs2mo ago
:property: GuildMember#displayName @14.15.2 The nickname of this member, or their user display name if they don't have one
tear
tear2mo ago
do i access this with interaction.member.displayName?
duck
duck2mo ago
yes
tear
tear2mo 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
monbrey2mo ago
I dont understand what you're asking interaction.member is the GuildMember instance of that person in that guild
tear
tear2mo ago
the displayName on the guild, not the user's displayName, i.e
No description
tear
tear2mo ago
server nickname *
monbrey
monbrey2mo 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
tear
tear2mo ago
Thank you all