on slash commands, execute command

on client.on('interactionCreate', async interaction => how can i execute the command ?
21 Replies
d.js docs
d.js docs2y 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 guide Interactions: Replying to slash commands - Responding to a command read more
Hugo4774
Hugo47742y ago
IsChatInputCommand doesn't execute it nah ? the command that correspond to the interaction
Hugo4774
Hugo47742y ago
now that i sent my interaction, how can i transform it to get my argument message from the execute function ?
chewie 🌈
chewie 🌈2y ago
you mean you want to get what you wrote in the options upon sending the interaction?
chewie 🌈
chewie 🌈2y ago
like this
Hugo4774
Hugo47742y ago
Nope not args But i do my slash command to execute a command which message.delete(). however message isn't define because i pass execute(interaction) and not message
chewie 🌈
chewie 🌈2y ago
and what do you want to delete? Thonkang
Hugo4774
Hugo47742y ago
The message of the command
chewie 🌈
chewie 🌈2y ago
commands dont have messages tho unless you reply
Hugo4774
Hugo47742y ago
So i can't delete my interaction slash command message ?
chewie 🌈
chewie 🌈2y ago
you could, but why its bad ux
Hugo4774
Hugo47742y ago
Meh Interaction.delete() ? All i see is that slash commands is good ux but it has a different comportment I have a command with everything fine. And when i want that command to be a slash one, it's absolutely not the same 😔
chewie 🌈
chewie 🌈2y ago
messages and slash commands are simply not the same meguFaceReverse
Hugo4774
Hugo47742y ago
So bad
chewie 🌈
chewie 🌈2y ago
dont use them then
Hugo4774
Hugo47742y ago
I think i will not use them yeah
chewie 🌈
chewie 🌈2y ago
even tho it takes just a few minutes to rewrite it to fit slash rip
Hugo4774
Hugo47742y ago
And how ? Depending of the command ?
chewie 🌈
chewie 🌈2y ago
by looking at the guide and documentation? you just have to remember that messages arent slash commands not everything you do with the message suits the slash command
Hugo4774
Hugo47742y ago
Yes Feel sad