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 toolkit12mo 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
Mardroide12mo ago
Hi, you can use interaction.user
Massicraft
Massicraft12mo ago
so if i want to store it const user = interacion.user ?
KAVI
KAVI12mo 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
Mardroide12mo ago
Yeah
KAVI
KAVI12mo ago
const { member } = interaction
Massicraft
Massicraft12mo ago
ok thanks