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"], arguments: ["any"],
description: "Check how fast bot will reply!" description: "Check how fast bot will reply!"
}, },
{ {
name: "help", name: "help",
run: (ctx, args) => { run: (ctx, args) => {

View File

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