Skip to content

Is is possible to have a command with no args with the dynamic commands approach #607

Answered by monbrey
MatazaNz asked this question in Q&A
Discussion options

You must be logged in to vote

You can remove args from the command run/execute function, it won't throw an error unless you then try to access it within that function while it's no longer defined. Since you're dealing with an unused var eslint rule, I'd assume that's not a problem.

Passing (message, args) to a function that only accepts (message) will just result in the second param being dropped.

I recommend you join the Discord server to get assistance with any future questions.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by almostSouji
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #604 on February 22, 2021 21:10.