Each command to be registered, must first be validated and if it don't pass an exception must be thrown.
Implement non-abstract Command.validate() in which we can enforce our validations, such as using only [\w\d\.] for command names and aliases, that aliases cannot be a set of one element (because it will then be interpreted as that one element and not a set) etc.
This validation is also valuable when people start contributing commands later on. Then we just require them to run slacker once before submitting a PR.
Each command to be registered, must first be validated and if it don't pass an exception must be thrown.
Implement non-abstract
Command.validate()
in which we can enforce our validations, such as using only[\w\d\.]
for command names and aliases, that aliases cannot be a set of one element (because it will then be interpreted as that one element and not a set) etc.This validation is also valuable when people start contributing commands later on. Then we just require them to run slacker once before submitting a PR.