on slash commands, execute command

on client.on('interactionCreate', async interaction => how can i execute the command ?
21 Replies
d.js docs
d.js docs3y 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
Hugo4774OP3y ago
IsChatInputCommand doesn't execute it nah ? the command that correspond to the interaction
Hugo4774
Hugo4774OP3y ago
now that i sent my interaction, how can i transform it to get my argument message from the execute function ?
chewie
chewie3y ago
you mean you want to get what you wrote in the options upon sending the interaction?
chewie
chewie3y ago
like this
Hugo4774
Hugo4774OP3y 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
chewie3y ago
and what do you want to delete? Thonkang
Hugo4774
Hugo4774OP3y ago
The message of the command
chewie
chewie3y ago
commands dont have messages tho unless you reply
Hugo4774
Hugo4774OP3y ago
So i can't delete my interaction slash command message ?
chewie
chewie3y ago
you could, but why its bad ux
Hugo4774
Hugo4774OP3y 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
chewie3y ago
messages and slash commands are simply not the same meguFaceReverse
Hugo4774
Hugo4774OP3y ago
So bad
chewie
chewie3y ago
dont use them then
Hugo4774
Hugo4774OP3y ago
I think i will not use them yeah
chewie
chewie3y ago
even tho it takes just a few minutes to rewrite it to fit slash rip
Hugo4774
Hugo4774OP3y ago
And how ? Depending of the command ?
chewie
chewie3y 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
Hugo4774OP3y ago
Yes Feel sad
Want results from more Discord servers?
Add your server