added description/long help and usage to all the current commands and updated a few of existing ones

added help info objects to the commands who missed them
changed all commands to be templated and removed the hard coded strings to only rely on templates (other commands might only want to use the direct string)
fixed handling of null parameters/submodules in help command
fixed experience module not showing up in help command
This commit is contained in:
Sheldan
2020-04-28 20:02:03 +02:00
parent 93f587bf26
commit 1fc459f65e
142 changed files with 274 additions and 50 deletions
@@ -48,7 +48,7 @@ public class BanId extends AbstractConditionableCommand {
parameters.add(Parameter.builder().name("reason").type(String.class).optional(true).remainder(true).build());
HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder()
.name("banid")
.name("banId")
.module(ModerationModule.MODERATION)
.templated(true)
.causesReaction(true)
@@ -48,11 +48,11 @@ public class Mute extends AbstractConditionableCommand {
parameters.add(Parameter.builder().name("user").type(Member.class).build());
parameters.add(Parameter.builder().name("duration").type(Duration.class).build());
parameters.add(Parameter.builder().name("reason").type(String.class).optional(true).remainder(true).build());
HelpInfo helpInfo = HelpInfo.builder().templated(false).build();
HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder()
.name("mute")
.module(ModerationModule.MODERATION)
.templated(false)
.templated(true)
.causesReaction(true)
.parameters(parameters)
.help(helpInfo)
@@ -34,11 +34,11 @@ public class SetMuteRole extends AbstractConditionableCommand {
public CommandConfiguration getConfiguration() {
List<Parameter> parameters = new ArrayList<>();
parameters.add(Parameter.builder().name("roleId").type(ARole.class).build());
HelpInfo helpInfo = HelpInfo.builder().templated(false).build();
HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder()
.name("setMuteRole")
.module(ModerationModule.MODERATION)
.templated(false)
.templated(true)
.causesReaction(true)
.parameters(parameters)
.help(helpInfo)
@@ -47,11 +47,11 @@ public class UnMute extends AbstractConditionableCommand {
public CommandConfiguration getConfiguration() {
List<Parameter> parameters = new ArrayList<>();
parameters.add(Parameter.builder().name("user").type(Member.class).build());
HelpInfo helpInfo = HelpInfo.builder().templated(false).build();
HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder()
.name("unMute")
.module(ModerationModule.MODERATION)
.templated(false)
.templated(true)
.causesReaction(true)
.parameters(parameters)
.help(helpInfo)
@@ -0,0 +1 @@
Bans the user by ID. This is necessary, if the user already left the server for example.
@@ -0,0 +1,10 @@
Applies the muted role to the user and logs the mute in the `mutes` post target.
The user will be automatically un muted after the time period is over and another un mute notification will be send to the
`mutes` post target.
The syntax for duration is the following:
s - seconds
m - minutes
h - hours
d - days
They must be positive and do no spaces between for example `1h23m` is one hour and twenty three minutes.
@@ -0,0 +1,2 @@
Sets the used mute role on the server. If there are previously roles assigned, this will be overwritten.
The configuration to make the role muting, needs to be done by you.
@@ -1 +1,8 @@
Sets the slow mode of the the current (or given channel) to the given duration.
Sets the slow mode of the the current (or given channel) to the given interval.
The syntax for interval is the following:
s - seconds
m - minutes
h - hours
d - days
They must be positive and do no spaces between for example `1h23m` is one hour and twenty three minutes.
@@ -0,0 +1 @@
Un-mutes the user. This does not send a notification in the `mutes` post target. Also removes any mutes towards the user on this server.