added conventions for templated commands, to reduce the amount of necessary configuration

added an exception, in case the command was missing the correct types of parameters (channel is required, no channel was found)
added fix text to exception handler, in case the message of an exception is null
fixed off-by-one error when searching the missing parameter
changed supported chanel from guildChannel to textChannel for posttarget
added slowmode command
This commit is contained in:
Sheldan
2020-03-18 21:06:27 +01:00
parent 9119d57108
commit ec21305725
21 changed files with 212 additions and 42 deletions

View File

@@ -7,6 +7,5 @@ import lombok.Getter;
public class HelpInfo {
private String usage;
private String longHelp;
private String longHelpTemplate;
private String usageTemplate;
private boolean templated;
}

View File

@@ -13,9 +13,9 @@ public class CommandConfiguration {
private String name;
private String module;
private String description;
private String descriptionTemplate;
private List<Parameter> parameters;
private boolean causesReaction;
private boolean templated;
private HelpInfo help;
public int getNecessaryParameterCount(){