How add arguments to slash command?

How add arguments to slash command and read it?
await bot.application.commands.create({name: 'test', description: 'Test command'}).catch(console.error);
await bot.application.commands.create({name: 'test', description: 'Test command'}).catch(console.error);
And
bot.on(Events.InteractionCreate, async (interaction) => { Print arguments... };
bot.on(Events.InteractionCreate, async (interaction) => { Print arguments... };
No description
5 Replies
d.js toolkit
d.js toolkit11mo 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 OP
vo0ov
vo0ov11mo ago
discord.js - 14.13.0 Node.js - v21.1.0
Epicness
Epicness11mo ago
discord.js Guide
Imagine a guide... that explores the many possibilities for your discord.js bot.
Epicness
Epicness11mo ago
This has all the info you need
vo0ov
vo0ov11mo ago
Thank you
Want results from more Discord servers?
Add your server