passing more arguments to slash commands

so how can I make slash commands execute with more parameters than just client? Im using the command and event handler from the discord.js guide and i think i have to change something with the
for (const file of eventFiles) {
const filePath = path.join(eventsPath, file);
const event = require(filePath);
if (event.once) {
client.once(event.name, (...args) => event.execute(...args));
} else {
client.on(event.name, (...args) => event.execute(...args));
}
}
for (const file of eventFiles) {
const filePath = path.join(eventsPath, file);
const event = require(filePath);
if (event.once) {
client.once(event.name, (...args) => event.execute(...args));
} else {
client.on(event.name, (...args) => event.execute(...args));
}
}
part of the code, although trying to add and pass new arguments before ...args resulted in, i assume, the program not being able to acknowledge ...args any help is immensely appreciated
1 Reply
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server