Validation setup
Last updated
Last updated
There are two types of validations:
Runtime validations
Ran against a command when it is used
Should return a true or false for if the command should be ran
You must provide any error messages if need be
Arguments:
command: Command
usage: CommandUsage
prefix: string
Syntax validations
Ran against every command when your bot starts up
Should throw an error if the syntax for your command is wrong
Arguments:
command: Command
Here is an example of setting up your validations in your main file: