How to get the member that used the slash command?

node = 18.16.0 discordjs = 14.11.0
7 Replies
d.js toolkit
d.js toolkitā€¢16mo ago
ā€¢ What's your exact discord.js npm list discord.js and node node -v version? ā€¢ Post the full error stack trace, not just the top part! ā€¢ Show your code! ā€¢ Explain what exactly your issue is. ā€¢ Not a discord.js issue? Check out #useful-servers.
Mardroide
Mardroideā€¢16mo ago
Hi, you can use interaction.user
Massicraft
Massicraftā€¢16mo ago
so if i want to store it const user = interacion.user ?
KAVI
KAVIā€¢16mo ago
That's the user object Not the member object If you want the member object you can do interaction.member And store it in a variable like how you'd do normally Or just destructure the interaction
Mardroide
Mardroideā€¢16mo ago
Yeah
KAVI
KAVIā€¢16mo ago
const { member } = interaction
Massicraft
Massicraftā€¢16mo ago
ok thanks
Want results from more Discord servers?
Add your server