Skip to content

question for command handling #716

Answered by SinisterDeveloper
ghost asked this question in Q&A
Discussion options

You must be logged in to vote

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");

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ghost
Comment options

Answer selected by almostSouji
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant