[AB-xxx] adding information whether a command is slash/message command only to help output

resizing template content column
This commit is contained in:
Sheldan
2023-09-20 02:01:09 +02:00
parent e8f630c94c
commit f12581f322
95 changed files with 880 additions and 140 deletions

View File

@@ -60,7 +60,14 @@ public class AnonReply extends AbstractConditionableCommand {
@Override
public CommandConfiguration getConfiguration() {
Parameter responseText = Parameter.builder().name("text").type(String.class).remainder(true).optional(true).templated(true).build();
Parameter responseText = Parameter
.builder()
.name("text")
.type(String.class)
.remainder(true)
.optional(true)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(responseText);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder()
@@ -68,6 +75,7 @@ public class AnonReply extends AbstractConditionableCommand {
.async(true)
.module(ModMailModuleDefinition.MODMAIL)
.parameters(parameters)
.messageCommandOnly(true)
.supportsEmbedException(true)
.help(helpInfo)
.templated(true)

View File

@@ -66,12 +66,20 @@ public class CloseSilently extends AbstractConditionableCommand {
@Override
public CommandConfiguration getConfiguration() {
Parameter note = Parameter.builder().name("note").type(String.class).remainder(true).optional(true).templated(true).build();
Parameter note = Parameter
.builder()
.name("note")
.type(String.class)
.remainder(true)
.optional(true)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(note);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder()
.name("closeSilently")
.async(true)
.messageCommandOnly(true)
.module(ModMailModuleDefinition.MODMAIL)
.parameters(parameters)
.help(helpInfo)

View File

@@ -36,14 +36,23 @@ public class RemoveModMailRole extends AbstractConditionableCommand {
@Override
public CommandConfiguration getConfiguration() {
Parameter categoryId = Parameter.builder().name("role").type(ARole.class).templated(true).build();
Parameter categoryId = Parameter
.builder()
.name("role")
.type(ARole.class)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(categoryId);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
HelpInfo helpInfo = HelpInfo
.builder()
.templated(true)
.build();
List<String> aliases = Arrays.asList("rmMmRole");
return CommandConfiguration.builder()
.name("removeModMailRole")
.module(ModMailModuleDefinition.MODMAIL)
.aliases(aliases)
.messageCommandOnly(true)
.supportsEmbedException(true)
.parameters(parameters)
.help(helpInfo)

View File

@@ -58,11 +58,19 @@ public class Reply extends AbstractConditionableCommand {
@Override
public CommandConfiguration getConfiguration() {
Parameter responseText = Parameter.builder().name("text").type(String.class).remainder(true).optional(true).templated(true).build();
Parameter responseText = Parameter
.builder()
.name("text")
.type(String.class)
.remainder(true)
.optional(true)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(responseText);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder()
.name("reply")
.messageCommandOnly(true)
.async(true)
.module(ModMailModuleDefinition.MODMAIL)
.parameters(parameters)

View File

@@ -34,12 +34,21 @@ public class SetModMailCategory extends AbstractConditionableCommand {
@Override
public CommandConfiguration getConfiguration() {
Parameter categoryId = Parameter.builder().name("categoryId").type(Long.class).templated(true).build();
Parameter categoryId = Parameter
.builder()
.name("categoryId")
.type(Long.class)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(categoryId);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
HelpInfo helpInfo = HelpInfo.
builder()
.templated(true)
.build();
List<String> aliases = Arrays.asList("modMailCat");
return CommandConfiguration.builder()
.name("setModMailCategory")
.messageCommandOnly(true)
.module(ModMailModuleDefinition.MODMAIL)
.aliases(aliases)
.supportsEmbedException(true)

View File

@@ -46,14 +46,23 @@ public class SetModMailRole extends AbstractConditionableCommand {
@Override
public CommandConfiguration getConfiguration() {
Parameter categoryId = Parameter.builder().name("role").type(Role.class).templated(true).build();
Parameter categoryId = Parameter
.builder()
.name("role")
.type(Role.class)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(categoryId);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
HelpInfo helpInfo = HelpInfo
.builder()
.templated(true)
.build();
List<String> aliases = Arrays.asList("modMailRole");
return CommandConfiguration.builder()
.name("setModMailRole")
.module(ModMailModuleDefinition.MODMAIL)
.aliases(aliases)
.messageCommandOnly(true)
.supportsEmbedException(true)
.parameters(parameters)
.help(helpInfo)