question for command handling #716
-
I wanted to a ask that is there any option or any code to set a minimum args ,maximum args and expected args |
Beta Was this translation helpful? Give feedback.
Answered by
SinisterDeveloper
Jul 19, 2021
Replies: 1 comment 1 reply
-
You can set a key in exports object(for command). Before executing the command, use conditional statements to check whether the given args is the expected number of args stated in the exports object. if (args.length < command.minArgs) return message.reply("Invalid number of arguments stated"); |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
almostSouji
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can set a key in exports object(for command). Before executing the command, use conditional statements to check whether the given args is the expected number of args stated in the exports object.