Better command arguments

This commit is contained in:
entar 2025-05-21 07:32:43 +07:00
parent 26c36c8b0c
commit 2005fffa96
2 changed files with 3 additions and 5 deletions

View File

@ -11,6 +11,7 @@ module.exports = [
arguments: ["any"],
description: "Check how fast bot will reply!"
},
{
name: "help",
run: (ctx, args) => {

View File

@ -114,11 +114,8 @@ client.on("messageCreate", (message) => {
}
// Run command
if (realCommand.arguments == ["any"] || realCommand.arguments == ["none"]) {
realCommand.run(message, args)
} else {
realCommand.run(message, ...args) // Example in extra.js
}
realCommand.run(message, ...args)
//...args passes it as separate args rather than an Array
})
// After getting the command list we can export it