[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

@@ -41,13 +41,19 @@ public class ActivateAssignableRolePlace extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter placeName = Parameter.builder().name("name").type(String.class).templated(true).build(); Parameter placeName = Parameter
.builder()
.name("name")
.type(String.class)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(placeName); List<Parameter> parameters = Arrays.asList(placeName);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("activateAssignableRolePlace") .name("activateAssignableRolePlace")
.module(AssignableRoleModuleDefinition.ASSIGNABLE_ROLES) .module(AssignableRoleModuleDefinition.ASSIGNABLE_ROLES)
.templated(true) .templated(true)
.messageCommandOnly(true)
.async(true) .async(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.causesReaction(true) .causesReaction(true)

View File

@@ -36,16 +36,40 @@ public class AddAssignableRoleCondition extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter placeName = Parameter.builder().name("name").type(String.class).templated(true).build(); Parameter placeName = Parameter
Parameter role = Parameter.builder().name("role").type(Role.class).templated(true).build(); .builder()
Parameter conditionKey = Parameter.builder().name("conditionKey").type(AssignableRoleConditionType.class).templated(true).build(); .name("name")
Parameter conditionValue = Parameter.builder().name("conditionParameter").type(String.class).templated(true).build(); .type(String.class)
.templated(true)
.build();
Parameter role = Parameter
.builder()
.name("role")
.type(Role.class)
.templated(true)
.build();
Parameter conditionKey = Parameter
.builder()
.name("conditionKey")
.type(AssignableRoleConditionType.class)
.templated(true)
.build();
Parameter conditionValue = Parameter
.builder()
.name("conditionParameter")
.type(String.class)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(placeName, role, conditionKey, conditionValue); List<Parameter> parameters = Arrays.asList(placeName, role, conditionKey, conditionValue);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo
.builder()
.templated(true)
.build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("addAssignableRoleCondition") .name("addAssignableRoleCondition")
.module(AssignableRoleModuleDefinition.ASSIGNABLE_ROLES) .module(AssignableRoleModuleDefinition.ASSIGNABLE_ROLES)
.templated(true) .templated(true)
.messageCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.causesReaction(true) .causesReaction(true)
.parameters(parameters) .parameters(parameters)

View File

@@ -62,17 +62,42 @@ public class AddRoleToAssignableRolePost extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter placeName = Parameter.builder().name("name").type(String.class).templated(true).build(); Parameter placeName = Parameter
Parameter role = Parameter.builder().name("role").type(Role.class).templated(true).build(); .builder()
Parameter rolePostName = Parameter.builder().name("displayText").type(String.class).templated(true).build(); .name("name")
Parameter emote = Parameter.builder().name("emote").type(FullEmote.class).optional(true).templated(true).build(); .type(String.class)
.templated(true)
.build();
Parameter role = Parameter
.builder()
.name("role")
.type(Role.class)
.templated(true)
.build();
Parameter rolePostName = Parameter
.builder()
.name("displayText")
.type(String.class)
.templated(true)
.build();
Parameter emote = Parameter
.builder()
.name("emote")
.type(FullEmote.class)
.optional(true)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(placeName, role, rolePostName, emote); List<Parameter> parameters = Arrays.asList(placeName, role, rolePostName, emote);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo
.builder()
.templated(true)
.build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("addRoleToAssignableRolePlace") .name("addRoleToAssignableRolePlace")
.module(AssignableRoleModuleDefinition.ASSIGNABLE_ROLES) .module(AssignableRoleModuleDefinition.ASSIGNABLE_ROLES)
.templated(true) .templated(true)
.causesReaction(true) .causesReaction(true)
.messageCommandOnly(true)
.async(true) .async(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.parameters(parameters) .parameters(parameters)

View File

@@ -47,9 +47,24 @@ public class ChangeAssignableRolePlaceConfig extends AbstractConditionableComman
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter assignableRolePlaceName = Parameter.builder().name("name").type(String.class).templated(true).build(); Parameter assignableRolePlaceName = Parameter
Parameter parameterKey = Parameter.builder().name("key").type(AssignableRolePlaceParameterKey.class).templated(true).build(); .builder()
Parameter parameterValue = Parameter.builder().name("value").type(String.class).templated(true).build(); .name("name")
.type(String.class)
.templated(true)
.build();
Parameter parameterKey = Parameter
.builder()
.name("key")
.type(AssignableRolePlaceParameterKey.class)
.templated(true)
.build();
Parameter parameterValue = Parameter
.builder()
.name("value")
.type(String.class)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(assignableRolePlaceName, parameterKey, parameterValue); List<Parameter> parameters = Arrays.asList(assignableRolePlaceName, parameterKey, parameterValue);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
@@ -57,6 +72,7 @@ public class ChangeAssignableRolePlaceConfig extends AbstractConditionableComman
.name("changeAssignableRolePlaceConfig") .name("changeAssignableRolePlaceConfig")
.module(AssignableRoleModuleDefinition.ASSIGNABLE_ROLES) .module(AssignableRoleModuleDefinition.ASSIGNABLE_ROLES)
.templated(true) .templated(true)
.messageCommandOnly(true)
.async(true) .async(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.causesReaction(true) .causesReaction(true)

View File

@@ -33,9 +33,6 @@ public class CreateAssignableRolePost extends AbstractConditionableCommand {
@Autowired @Autowired
private ChannelManagementService channelManagementService; private ChannelManagementService channelManagementService;
@Autowired
private ServerManagementService serverManagementService;
@Override @Override
public CommandResult execute(CommandContext commandContext) { public CommandResult execute(CommandContext commandContext) {
List<Object> parameters = commandContext.getParameters().getParameters(); List<Object> parameters = commandContext.getParameters().getParameters();
@@ -57,20 +54,47 @@ public class CreateAssignableRolePost extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
List<ParameterValidator> rolePlaceNameValidator = Arrays.asList(MaxStringLengthValidator.max(AssignableRolePlace.ASSIGNABLE_PLACE_NAME_LIMIT)); List<ParameterValidator> rolePlaceNameValidator = Arrays.asList(MaxStringLengthValidator.max(AssignableRolePlace.ASSIGNABLE_PLACE_NAME_LIMIT));
Parameter rolePostName = Parameter.builder().name("name").validators(rolePlaceNameValidator).type(String.class).templated(true).build(); Parameter rolePostName = Parameter
Parameter channel = Parameter.builder().name("channel").type(TextChannel.class).templated(true).build(); .builder()
Parameter type = Parameter.builder().name("type").type(AssignableRolePlaceType.class).templated(true).optional(true).build(); .name("name")
.validators(rolePlaceNameValidator)
.type(String.class)
.templated(true)
.build();
Parameter channel = Parameter
.builder()
.name("channel")
.type(TextChannel.class)
.templated(true)
.build();
Parameter type = Parameter
.builder()
.name("type")
.type(AssignableRolePlaceType.class)
.templated(true)
.optional(true)
.build();
List<ParameterValidator> rolePlaceDescriptionValidator = Arrays.asList(MaxStringLengthValidator.max(AssignableRolePlace.ASSIGNABLE_PLACE_NAME_LIMIT)); List<ParameterValidator> rolePlaceDescriptionValidator = Arrays.asList(MaxStringLengthValidator.max(AssignableRolePlace.ASSIGNABLE_PLACE_NAME_LIMIT));
Parameter text = Parameter.builder().name("text").validators(rolePlaceDescriptionValidator).type(String.class).templated(true).build(); Parameter text = Parameter
.builder()
.name("text")
.validators(rolePlaceDescriptionValidator)
.type(String.class)
.templated(true)
.build();
List<String> aliases = Arrays.asList("crRPl", "crAssRoPl"); List<String> aliases = Arrays.asList("crRPl", "crAssRoPl");
List<Parameter> parameters = Arrays.asList(rolePostName, channel, text, type); List<Parameter> parameters = Arrays.asList(rolePostName, channel, text, type);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo
.builder()
.templated(true)
.build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("createAssignableRolePlace") .name("createAssignableRolePlace")
.module(AssignableRoleModuleDefinition.ASSIGNABLE_ROLES) .module(AssignableRoleModuleDefinition.ASSIGNABLE_ROLES)
.templated(true) .templated(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.causesReaction(true) .causesReaction(true)
.messageCommandOnly(true)
.parameters(parameters) .parameters(parameters)
.aliases(aliases) .aliases(aliases)
.help(helpInfo) .help(helpInfo)

View File

@@ -41,7 +41,12 @@ public class DeactivateAssignableRolePlace extends AbstractConditionableCommand
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter rolePostName = Parameter.builder().name("name").type(String.class).templated(true).build(); Parameter rolePostName = Parameter
.builder()
.name("name")
.type(String.class)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(rolePostName); List<Parameter> parameters = Arrays.asList(rolePostName);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
@@ -49,6 +54,7 @@ public class DeactivateAssignableRolePlace extends AbstractConditionableCommand
.module(AssignableRoleModuleDefinition.ASSIGNABLE_ROLES) .module(AssignableRoleModuleDefinition.ASSIGNABLE_ROLES)
.templated(true) .templated(true)
.async(true) .async(true)
.messageCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.causesReaction(true) .causesReaction(true)
.parameters(parameters) .parameters(parameters)

View File

@@ -41,7 +41,12 @@ public class DeleteAssignableRolePlace extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter rolePostName = Parameter.builder().name("name").type(String.class).templated(true).build(); Parameter rolePostName = Parameter
.builder()
.name("name")
.type(String.class)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(rolePostName); List<Parameter> parameters = Arrays.asList(rolePostName);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
@@ -50,6 +55,7 @@ public class DeleteAssignableRolePlace extends AbstractConditionableCommand {
.templated(true) .templated(true)
.causesReaction(true) .causesReaction(true)
.async(true) .async(true)
.messageCommandOnly(true)
.requiresConfirmation(true) .requiresConfirmation(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.parameters(parameters) .parameters(parameters)

View File

@@ -46,15 +46,29 @@ public class EditAssignableRolePlaceText extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
List<ParameterValidator> rolePlaceNameValidator = Arrays.asList(MaxStringLengthValidator.max(AssignableRolePlace.ASSIGNABLE_PLACE_NAME_LIMIT)); List<ParameterValidator> rolePlaceNameValidator = Arrays.asList(MaxStringLengthValidator.max(AssignableRolePlace.ASSIGNABLE_PLACE_NAME_LIMIT));
Parameter rolePostName = Parameter.builder().name("name").validators(rolePlaceNameValidator).type(String.class).templated(true).build(); Parameter rolePostName = Parameter
Parameter newText = Parameter.builder().name("newText").type(String.class).templated(true).build(); .builder().name("name")
.validators(rolePlaceNameValidator)
.type(String.class)
.templated(true)
.build();
Parameter newText = Parameter
.builder()
.name("newText")
.type(String.class)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(rolePostName, newText); List<Parameter> parameters = Arrays.asList(rolePostName, newText);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo
.builder()
.templated(true)
.build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("editAssignableRolePlaceText") .name("editAssignableRolePlaceText")
.module(AssignableRoleModuleDefinition.ASSIGNABLE_ROLES) .module(AssignableRoleModuleDefinition.ASSIGNABLE_ROLES)
.templated(true) .templated(true)
.async(true) .async(true)
.messageCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.causesReaction(true) .causesReaction(true)
.parameters(parameters) .parameters(parameters)

View File

@@ -67,6 +67,7 @@ public class MoveAssignableRolePlace extends AbstractConditionableCommand {
.module(AssignableRoleModuleDefinition.ASSIGNABLE_ROLES) .module(AssignableRoleModuleDefinition.ASSIGNABLE_ROLES)
.templated(true) .templated(true)
.causesReaction(true) .causesReaction(true)
.messageCommandOnly(true)
.async(true) .async(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.parameters(parameters) .parameters(parameters)

View File

@@ -35,15 +35,31 @@ public class RemoveAssignableRoleCondition extends AbstractConditionableCommand
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter placeName = Parameter.builder().name("name").type(String.class).templated(true).build(); Parameter placeName = Parameter
Parameter role = Parameter.builder().name("role").type(Role.class).templated(true).build(); .builder()
Parameter conditionKey = Parameter.builder().name("conditionKey").type(AssignableRoleConditionType.class).templated(true).build(); .name("name")
.type(String.class)
.templated(true)
.build();
Parameter role = Parameter
.builder()
.name("role")
.type(Role.class)
.templated(true)
.build();
Parameter conditionKey = Parameter
.builder()
.name("conditionKey")
.type(AssignableRoleConditionType.class)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(placeName, role, conditionKey); List<Parameter> parameters = Arrays.asList(placeName, role, conditionKey);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("removeAssignableRoleCondition") .name("removeAssignableRoleCondition")
.module(AssignableRoleModuleDefinition.ASSIGNABLE_ROLES) .module(AssignableRoleModuleDefinition.ASSIGNABLE_ROLES)
.templated(true) .templated(true)
.messageCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.causesReaction(true) .causesReaction(true)
.parameters(parameters) .parameters(parameters)

View File

@@ -44,16 +44,30 @@ public class RemoveRoleFromAssignableRolePlace extends AbstractConditionableComm
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter rolePostName = Parameter.builder().name("name").type(String.class).templated(true).build(); Parameter rolePostName = Parameter
Parameter role = Parameter.builder().name("role").type(ARole.class).templated(true).build(); .builder()
.name("name")
.type(String.class)
.templated(true)
.build();
Parameter role = Parameter
.builder()
.name("role")
.type(ARole.class)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(rolePostName, role); List<Parameter> parameters = Arrays.asList(rolePostName, role);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo
.builder()
.templated(true)
.build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("removeRoleFromAssignableRolePlace") .name("removeRoleFromAssignableRolePlace")
.module(AssignableRoleModuleDefinition.ASSIGNABLE_ROLES) .module(AssignableRoleModuleDefinition.ASSIGNABLE_ROLES)
.templated(true) .templated(true)
.causesReaction(true) .causesReaction(true)
.async(true) .async(true)
.messageCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.parameters(parameters) .parameters(parameters)
.help(helpInfo) .help(helpInfo)

View File

@@ -48,14 +48,23 @@ public class SetupAssignableRolePlace extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter rolePostName = Parameter.builder().name("name").type(String.class).templated(true).build(); Parameter rolePostName = Parameter
.builder()
.name("name")
.type(String.class)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(rolePostName); List<Parameter> parameters = Arrays.asList(rolePostName);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo
.builder()
.templated(true)
.build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("setupAssignableRolePlace") .name("setupAssignableRolePlace")
.module(AssignableRoleModuleDefinition.ASSIGNABLE_ROLES) .module(AssignableRoleModuleDefinition.ASSIGNABLE_ROLES)
.templated(true) .templated(true)
.async(true) .async(true)
.messageCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.causesReaction(true) .causesReaction(true)
.parameters(parameters) .parameters(parameters)

View File

@@ -48,15 +48,24 @@ public class ShowAssignableRolePlaceConfig extends AbstractConditionableCommand
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter rolePostName = Parameter.builder().name("name").type(String.class).templated(true).build(); Parameter rolePostName = Parameter
.builder()
.name("name")
.type(String.class)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(rolePostName); List<Parameter> parameters = Arrays.asList(rolePostName);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo
.builder()
.templated(true)
.build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("showAssignableRolePlaceConfig") .name("showAssignableRolePlaceConfig")
.module(AssignableRoleModuleDefinition.ASSIGNABLE_ROLES) .module(AssignableRoleModuleDefinition.ASSIGNABLE_ROLES)
.templated(true) .templated(true)
.async(true) .async(true)
.causesReaction(false) .causesReaction(false)
.messageCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.parameters(parameters) .parameters(parameters)
.help(helpInfo) .help(helpInfo)

View File

@@ -45,11 +45,15 @@ public class ShowAssignableRolePlaces extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo
.builder()
.templated(true)
.build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("showAssignableRolePlaces") .name("showAssignableRolePlaces")
.module(AssignableRoleModuleDefinition.ASSIGNABLE_ROLES) .module(AssignableRoleModuleDefinition.ASSIGNABLE_ROLES)
.templated(true) .templated(true)
.messageCommandOnly(true)
.async(true) .async(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.help(helpInfo) .help(helpInfo)

View File

@@ -89,6 +89,7 @@ public class CreateCustomCommand extends AbstractConditionableCommand {
.module(UtilityModuleDefinition.UTILITY) .module(UtilityModuleDefinition.UTILITY)
.templated(true) .templated(true)
.async(true) .async(true)
.slashCommandOnly(true)
.slashCommandConfig(slashCommandConfig) .slashCommandConfig(slashCommandConfig)
.causesReaction(true) .causesReaction(true)
.supportsEmbedException(true) .supportsEmbedException(true)

View File

@@ -48,11 +48,6 @@ public class DeleteCustomCommand extends AbstractConditionableCommand {
.thenApply(interactionHook -> CommandResult.fromSuccess()); .thenApply(interactionHook -> CommandResult.fromSuccess());
} }
@Override
public FeatureDefinition getFeature() {
return CustomCommandFeatureDefinition.CUSTOM_COMMAND;
}
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter commandNameParameter = Parameter Parameter commandNameParameter = Parameter
@@ -82,9 +77,15 @@ public class DeleteCustomCommand extends AbstractConditionableCommand {
.async(true) .async(true)
.slashCommandConfig(slashCommandConfig) .slashCommandConfig(slashCommandConfig)
.causesReaction(true) .causesReaction(true)
.slashCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.parameters(parameters) .parameters(parameters)
.help(helpInfo) .help(helpInfo)
.build(); .build();
} }
@Override
public FeatureDefinition getFeature() {
return CustomCommandFeatureDefinition.CUSTOM_COMMAND;
}
} }

View File

@@ -104,6 +104,7 @@ public class GetCustomCommand extends AbstractConditionableCommand {
.module(UtilityModuleDefinition.UTILITY) .module(UtilityModuleDefinition.UTILITY)
.templated(true) .templated(true)
.async(true) .async(true)
.slashCommandOnly(true)
.slashCommandConfig(slashCommandConfig) .slashCommandConfig(slashCommandConfig)
.causesReaction(true) .causesReaction(true)
.supportsEmbedException(true) .supportsEmbedException(true)

View File

@@ -76,6 +76,7 @@ public class ListCustomCommands extends AbstractConditionableCommand {
.module(UtilityModuleDefinition.UTILITY) .module(UtilityModuleDefinition.UTILITY)
.templated(true) .templated(true)
.async(true) .async(true)
.slashCommandOnly(true)
.slashCommandConfig(slashCommandConfig) .slashCommandConfig(slashCommandConfig)
.causesReaction(true) .causesReaction(true)
.supportsEmbedException(true) .supportsEmbedException(true)

View File

@@ -52,14 +52,28 @@ public class React extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
List<Parameter> parameters = new ArrayList<>(); List<Parameter> parameters = new ArrayList<>();
parameters.add(Parameter.builder().name("message").type(Message.class).templated(true).build()); Parameter messageParameter = Parameter
parameters.add(Parameter.builder().name("text").type(String.class).remainder(true).templated(true).build()); .builder()
.name("message")
.type(Message.class)
.templated(true)
.build();
parameters.add(messageParameter);
Parameter textParameter = Parameter
.builder()
.name("text")
.type(String.class)
.remainder(true)
.templated(true)
.build();
parameters.add(textParameter);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("react") .name("react")
.module(EntertainmentModuleDefinition.ENTERTAINMENT) .module(EntertainmentModuleDefinition.ENTERTAINMENT)
.templated(true) .templated(true)
.causesReaction(true) .causesReaction(true)
.messageCommandOnly(true)
.async(true) .async(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.parameters(parameters) .parameters(parameters)

View File

@@ -69,6 +69,7 @@ public class SetExpRole extends AbstractConditionableCommand {
.module(ExperienceModuleDefinition.EXPERIENCE) .module(ExperienceModuleDefinition.EXPERIENCE)
.templated(true) .templated(true)
.async(true) .async(true)
.messageCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.causesReaction(true) .causesReaction(true)
.requiresConfirmation(true) .requiresConfirmation(true)

View File

@@ -46,7 +46,10 @@ public class SyncRoles extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
List<Parameter> parameters = new ArrayList<>(); List<Parameter> parameters = new ArrayList<>();
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo
.builder()
.templated(true)
.build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("syncExpRoles") .name("syncExpRoles")
.module(ExperienceModuleDefinition.EXPERIENCE) .module(ExperienceModuleDefinition.EXPERIENCE)
@@ -54,6 +57,7 @@ public class SyncRoles extends AbstractConditionableCommand {
.async(true) .async(true)
.requiresConfirmation(true) .requiresConfirmation(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.messageCommandOnly(true)
.causesReaction(true) .causesReaction(true)
.parameters(parameters) .parameters(parameters)
.help(helpInfo) .help(helpInfo)

View File

@@ -59,13 +59,20 @@ public class UnSetExpRole extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
List<Parameter> parameters = new ArrayList<>(); List<Parameter> parameters = new ArrayList<>();
parameters.add(Parameter.builder().name("role").templated(true).type(ARole.class).build()); Parameter roleParameter = Parameter
.builder()
.name("role")
.templated(true)
.type(ARole.class)
.build();
parameters.add(roleParameter);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("unSetExpRole") .name("unSetExpRole")
.module(ExperienceModuleDefinition.EXPERIENCE) .module(ExperienceModuleDefinition.EXPERIENCE)
.templated(true) .templated(true)
.async(true) .async(true)
.messageCommandOnly(true)
.causesReaction(true) .causesReaction(true)
.requiresConfirmation(true) .requiresConfirmation(true)
.supportsEmbedException(true) .supportsEmbedException(true)

View File

@@ -33,13 +33,20 @@ public class AllowInvite extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
List<Parameter> parameters = new ArrayList<>(); List<Parameter> parameters = new ArrayList<>();
parameters.add(Parameter.builder().name("invite").type(String.class).templated(true).build()); Parameter inviteParameter = Parameter
.builder()
.name("invite")
.type(String.class)
.templated(true)
.build();
parameters.add(inviteParameter);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("allowInvite") .name("allowInvite")
.module(InviteFilterModerationModuleDefinition.MODERATION) .module(InviteFilterModerationModuleDefinition.MODERATION)
.templated(true) .templated(true)
.async(true) .async(true)
.messageCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.causesReaction(true) .causesReaction(true)
.parameters(parameters) .parameters(parameters)

View File

@@ -33,12 +33,19 @@ public class DisAllowInvite extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
List<Parameter> parameters = new ArrayList<>(); List<Parameter> parameters = new ArrayList<>();
parameters.add(Parameter.builder().name("invite").type(String.class).templated(true).build()); Parameter inviteParameter = Parameter
.builder()
.name("invite")
.type(String.class)
.templated(true)
.build();
parameters.add(inviteParameter);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("disAllowInvite") .name("disAllowInvite")
.module(InviteFilterModerationModuleDefinition.MODERATION) .module(InviteFilterModerationModuleDefinition.MODERATION)
.templated(true) .templated(true)
.messageCommandOnly(true)
.async(true) .async(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.causesReaction(true) .causesReaction(true)

View File

@@ -44,13 +44,21 @@ public class RemoveTrackedInviteLinks extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
List<Parameter> parameters = new ArrayList<>(); List<Parameter> parameters = new ArrayList<>();
parameters.add(Parameter.builder().name("invite").type(String.class).optional(true).templated(true).build()); Parameter inviteParameter = Parameter
.builder()
.name("invite")
.type(String.class)
.optional(true)
.templated(true)
.build();
parameters.add(inviteParameter);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("removeTrackedInviteLinks") .name("removeTrackedInviteLinks")
.module(InviteFilterModerationModuleDefinition.MODERATION) .module(InviteFilterModerationModuleDefinition.MODERATION)
.templated(true) .templated(true)
.async(true) .async(true)
.messageCommandOnly(true)
.requiresConfirmation(true) .requiresConfirmation(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.causesReaction(true) .causesReaction(true)

View File

@@ -61,13 +61,21 @@ public class ShowTrackedInviteLinks extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
List<Parameter> parameters = new ArrayList<>(); List<Parameter> parameters = new ArrayList<>();
parameters.add(Parameter.builder().name("amount").type(Integer.class).optional(true).templated(true).build()); Parameter amountParameter = Parameter
.builder()
.name("amount")
.type(Integer.class)
.optional(true)
.templated(true)
.build();
parameters.add(amountParameter);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("showTrackedInviteLinks") .name("showTrackedInviteLinks")
.module(InviteFilterModerationModuleDefinition.MODERATION) .module(InviteFilterModerationModuleDefinition.MODERATION)
.templated(true) .templated(true)
.async(true) .async(true)
.messageCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.parameters(parameters) .parameters(parameters)
.help(helpInfo) .help(helpInfo)

View File

@@ -65,15 +65,35 @@ public class BanDelete extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
List<Parameter> parameters = new ArrayList<>(); List<Parameter> parameters = new ArrayList<>();
parameters.add(Parameter.builder().name("user").templated(true).type(User.class).build()); Parameter userParameter = Parameter
parameters.add(Parameter.builder().name("delDays").templated(true).type(Integer.class).build()); .builder()
parameters.add(Parameter.builder().name("reason").templated(true).type(String.class).remainder(true).build()); .name("user")
.templated(true)
.type(User.class)
.build();
parameters.add(userParameter);
Parameter delDaysParameter = Parameter
.builder()
.name("delDays")
.templated(true)
.type(Integer.class)
.build();
parameters.add(delDaysParameter);
Parameter reasonParameter = Parameter
.builder()
.name("reason")
.templated(true)
.type(String.class)
.remainder(true)
.build();
parameters.add(reasonParameter);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
List<EffectConfig> effectConfig = Arrays.asList(EffectConfig.builder().position(0).effectKey(BAN_EFFECT_KEY).build()); List<EffectConfig> effectConfig = Arrays.asList(EffectConfig.builder().position(0).effectKey(BAN_EFFECT_KEY).build());
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("banDelete") .name("banDelete")
.module(ModerationModuleDefinition.MODERATION) .module(ModerationModuleDefinition.MODERATION)
.templated(true) .templated(true)
.messageCommandOnly(true)
.async(true) .async(true)
.effects(effectConfig) .effects(effectConfig)
.supportsEmbedException(true) .supportsEmbedException(true)

View File

@@ -84,6 +84,7 @@ public class EditInfraction extends AbstractConditionableCommand {
.templated(true) .templated(true)
.async(true) .async(true)
.causesReaction(false) .causesReaction(false)
.slashCommandOnly(true)
.slashCommandConfig(slashCommandConfig) .slashCommandConfig(slashCommandConfig)
.supportsEmbedException(true) .supportsEmbedException(true)
.parameters(parameters) .parameters(parameters)

View File

@@ -75,9 +75,6 @@ public class Infractions extends AbstractConditionableCommand {
@Autowired @Autowired
private SlashCommandParameterService slashCommandParameterService; private SlashCommandParameterService slashCommandParameterService;
@Autowired
private UserService userService;
@Override @Override
public CompletableFuture<CommandResult> executeAsync(CommandContext commandContext) { public CompletableFuture<CommandResult> executeAsync(CommandContext commandContext) {
List<Infraction> infractions; List<Infraction> infractions;

View File

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

View File

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

View File

@@ -36,14 +36,23 @@ public class RemoveModMailRole extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { 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); 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"); List<String> aliases = Arrays.asList("rmMmRole");
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("removeModMailRole") .name("removeModMailRole")
.module(ModMailModuleDefinition.MODMAIL) .module(ModMailModuleDefinition.MODMAIL)
.aliases(aliases) .aliases(aliases)
.messageCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.parameters(parameters) .parameters(parameters)
.help(helpInfo) .help(helpInfo)

View File

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

View File

@@ -34,12 +34,21 @@ public class SetModMailCategory extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { 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); 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"); List<String> aliases = Arrays.asList("modMailCat");
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("setModMailCategory") .name("setModMailCategory")
.messageCommandOnly(true)
.module(ModMailModuleDefinition.MODMAIL) .module(ModMailModuleDefinition.MODMAIL)
.aliases(aliases) .aliases(aliases)
.supportsEmbedException(true) .supportsEmbedException(true)

View File

@@ -46,14 +46,23 @@ public class SetModMailRole extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { 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); 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"); List<String> aliases = Arrays.asList("modMailRole");
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("setModMailRole") .name("setModMailRole")
.module(ModMailModuleDefinition.MODMAIL) .module(ModMailModuleDefinition.MODMAIL)
.aliases(aliases) .aliases(aliases)
.messageCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.parameters(parameters) .parameters(parameters)
.help(helpInfo) .help(helpInfo)

View File

@@ -67,13 +67,23 @@ public class Profanities extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter memberParameter = Parameter.builder().templated(true).name("member").type(Member.class).optional(true).build(); Parameter memberParameter = Parameter
.builder()
.templated(true)
.name("member")
.type(Member.class)
.optional(true)
.build();
List<Parameter> parameters = Collections.singletonList(memberParameter); List<Parameter> parameters = Collections.singletonList(memberParameter);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo
.builder()
.templated(true)
.build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("profanities") .name("profanities")
.module(ProfanityFilterModerationModuleDefinition.MODERATION) .module(ProfanityFilterModerationModuleDefinition.MODERATION)
.templated(true) .templated(true)
.messageCommandOnly(true)
.async(true) .async(true)
.causesReaction(false) .causesReaction(false)
.parameters(parameters) .parameters(parameters)

View File

@@ -45,7 +45,12 @@ public class DisableRepostCheck extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter channelToSet = Parameter.builder().name("channelGroup").type(AChannelGroup.class).templated(true).build(); Parameter channelToSet = Parameter
.builder()
.name("channelGroup")
.type(AChannelGroup.class)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(channelToSet); List<Parameter> parameters = Arrays.asList(channelToSet);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
@@ -53,6 +58,7 @@ public class DisableRepostCheck extends AbstractConditionableCommand {
.module(RepostDetectionModuleDefinition.REPOST_DETECTION) .module(RepostDetectionModuleDefinition.REPOST_DETECTION)
.templated(true) .templated(true)
.async(false) .async(false)
.messageCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.causesReaction(true) .causesReaction(true)
.parameters(parameters) .parameters(parameters)

View File

@@ -45,7 +45,12 @@ public class EnableRepostCheck extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter channelToSet = Parameter.builder().name("channelGroup").type(AChannelGroup.class).templated(true).build(); Parameter channelToSet = Parameter
.builder()
.name("channelGroup")
.type(AChannelGroup.class)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(channelToSet); List<Parameter> parameters = Arrays.asList(channelToSet);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
@@ -53,6 +58,7 @@ public class EnableRepostCheck extends AbstractConditionableCommand {
.module(RepostDetectionModuleDefinition.REPOST_DETECTION) .module(RepostDetectionModuleDefinition.REPOST_DETECTION)
.templated(true) .templated(true)
.async(false) .async(false)
.messageCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.causesReaction(true) .causesReaction(true)
.parameters(parameters) .parameters(parameters)

View File

@@ -42,13 +42,23 @@ public class PurgeImagePosts extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter channelToSet = Parameter.builder().name("member").type(AUserInAServer.class).templated(true).optional(true).build(); Parameter channelToSet = Parameter
.builder()
.name("member")
.type(AUserInAServer.class)
.templated(true)
.optional(true)
.build();
List<Parameter> parameters = Arrays.asList(channelToSet); List<Parameter> parameters = Arrays.asList(channelToSet);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo
.builder()
.templated(true)
.build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("purgeImagePosts") .name("purgeImagePosts")
.module(RepostDetectionModuleDefinition.REPOST_DETECTION) .module(RepostDetectionModuleDefinition.REPOST_DETECTION)
.templated(true) .templated(true)
.messageCommandOnly(true)
.async(false) .async(false)
.requiresConfirmation(true) .requiresConfirmation(true)
.supportsEmbedException(true) .supportsEmbedException(true)

View File

@@ -42,7 +42,13 @@ public class PurgeReposts extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter channelToSet = Parameter.builder().name("member").type(AUserInAServer.class).templated(true).optional(true).build(); Parameter channelToSet = Parameter
.builder()
.name("member")
.type(AUserInAServer.class)
.templated(true)
.optional(true)
.build();
List<Parameter> parameters = Arrays.asList(channelToSet); List<Parameter> parameters = Arrays.asList(channelToSet);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
@@ -51,6 +57,7 @@ public class PurgeReposts extends AbstractConditionableCommand {
.templated(true) .templated(true)
.async(false) .async(false)
.requiresConfirmation(true) .requiresConfirmation(true)
.messageCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.causesReaction(true) .causesReaction(true)
.parameters(parameters) .parameters(parameters)

View File

@@ -75,14 +75,24 @@ public class RepostLeaderboard extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter channelToSet = Parameter.builder().name("page").type(Integer.class).templated(true).optional(true).build(); Parameter channelToSet = Parameter
.builder()
.name("page")
.type(Integer.class)
.templated(true)
.optional(true)
.build();
List<Parameter> parameters = Arrays.asList(channelToSet); List<Parameter> parameters = Arrays.asList(channelToSet);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo
.builder()
.templated(true)
.build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("repostLeaderboard") .name("repostLeaderboard")
.module(RepostDetectionModuleDefinition.REPOST_DETECTION) .module(RepostDetectionModuleDefinition.REPOST_DETECTION)
.templated(true) .templated(true)
.async(true) .async(true)
.messageCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.causesReaction(true) .causesReaction(true)
.parameters(parameters) .parameters(parameters)

View File

@@ -43,11 +43,15 @@ public class ShowRepostCheckChannels extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo
.builder()
.templated(true)
.build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("showRepostCheckChannels") .name("showRepostCheckChannels")
.module(RepostDetectionModuleDefinition.REPOST_DETECTION) .module(RepostDetectionModuleDefinition.REPOST_DETECTION)
.templated(true) .templated(true)
.messageCommandOnly(true)
.async(true) .async(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.causesReaction(false) .causesReaction(false)

View File

@@ -43,7 +43,13 @@ public class DeleteTrackedEmote extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
List<Parameter> parameters = new ArrayList<>(); List<Parameter> parameters = new ArrayList<>();
parameters.add(Parameter.builder().name("trackedEmote").templated(true).type(TrackedEmote.class).build()); Parameter trackedEmoteParameter = Parameter
.builder()
.name("trackedEmote")
.templated(true)
.type(TrackedEmote.class)
.build();
parameters.add(trackedEmoteParameter);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("deleteTrackedEmote") .name("deleteTrackedEmote")
@@ -51,6 +57,7 @@ public class DeleteTrackedEmote extends AbstractConditionableCommand {
.templated(true) .templated(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.causesReaction(true) .causesReaction(true)
.messageCommandOnly(true)
.requiresConfirmation(true) .requiresConfirmation(true)
.parameters(parameters) .parameters(parameters)
.help(helpInfo) .help(helpInfo)

View File

@@ -82,7 +82,14 @@ public class DeletedEmoteStats extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
List<Parameter> parameters = new ArrayList<>(); List<Parameter> parameters = new ArrayList<>();
parameters.add(Parameter.builder().name("period").templated(true).optional(true).type(Duration.class).build()); Parameter periodParameter = Parameter
.builder()
.name("period")
.templated(true)
.optional(true)
.type(Duration.class)
.build();
parameters.add(periodParameter);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("deletedEmoteStats") .name("deletedEmoteStats")
@@ -90,6 +97,7 @@ public class DeletedEmoteStats extends AbstractConditionableCommand {
.templated(true) .templated(true)
.async(true) .async(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.messageCommandOnly(true)
.causesReaction(true) .causesReaction(true)
.parameters(parameters) .parameters(parameters)
.help(helpInfo) .help(helpInfo)

View File

@@ -47,12 +47,20 @@ public class DisableEmoteTracking extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
List<Parameter> parameters = new ArrayList<>(); List<Parameter> parameters = new ArrayList<>();
parameters.add(Parameter.builder().name("trackedEmote").templated(true).optional(true).type(TrackedEmote.class).build()); Parameter trackedEmoteParameter = Parameter
.builder()
.name("trackedEmote")
.templated(true)
.optional(true)
.type(TrackedEmote.class)
.build();
parameters.add(trackedEmoteParameter);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("disableEmoteTracking") .name("disableEmoteTracking")
.module(EmoteTrackingModuleDefinition.EMOTE_TRACKING) .module(EmoteTrackingModuleDefinition.EMOTE_TRACKING)
.templated(true) .templated(true)
.messageCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.causesReaction(true) .causesReaction(true)
.parameters(parameters) .parameters(parameters)

View File

@@ -66,14 +66,28 @@ public class EmoteStat extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
List<Parameter> parameters = new ArrayList<>(); List<Parameter> parameters = new ArrayList<>();
parameters.add(Parameter.builder().name("trackedEmote").templated(true).type(TrackedEmote.class).build()); Parameter trackedEmoteParameter = Parameter
parameters.add(Parameter.builder().name("period").templated(true).optional(true).type(Duration.class).build()); .builder()
.name("trackedEmote")
.templated(true)
.type(TrackedEmote.class)
.build();
parameters.add(trackedEmoteParameter);
Parameter periodParameter = Parameter
.builder()
.name("period")
.templated(true)
.optional(true)
.type(Duration.class)
.build();
parameters.add(periodParameter);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("emoteStat") .name("emoteStat")
.module(EmoteTrackingModuleDefinition.EMOTE_TRACKING) .module(EmoteTrackingModuleDefinition.EMOTE_TRACKING)
.templated(true) .templated(true)
.async(true) .async(true)
.messageCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.causesReaction(true) .causesReaction(true)
.parameters(parameters) .parameters(parameters)

View File

@@ -83,12 +83,20 @@ public class EmoteStats extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
List<Parameter> parameters = new ArrayList<>(); List<Parameter> parameters = new ArrayList<>();
parameters.add(Parameter.builder().name("period").templated(true).optional(true).type(Duration.class).build()); Parameter periodParameter = Parameter
.builder()
.name("period")
.templated(true)
.optional(true)
.type(Duration.class)
.build();
parameters.add(periodParameter);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("emoteStats") .name("emoteStats")
.module(EmoteTrackingModuleDefinition.EMOTE_TRACKING) .module(EmoteTrackingModuleDefinition.EMOTE_TRACKING)
.templated(true) .templated(true)
.messageCommandOnly(true)
.async(true) .async(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.causesReaction(true) .causesReaction(true)

View File

@@ -97,13 +97,24 @@ public class ExportEmoteStats extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
List<Parameter> parameters = new ArrayList<>(); List<Parameter> parameters = new ArrayList<>();
parameters.add(Parameter.builder().name("period").templated(true).optional(true).type(Duration.class).build()); Parameter periodParameter = Parameter
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); .builder()
.name("period")
.templated(true)
.optional(true)
.type(Duration.class)
.build();
parameters.add(periodParameter);
HelpInfo helpInfo = HelpInfo
.builder()
.templated(true)
.build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("exportEmoteStats") .name("exportEmoteStats")
.module(EmoteTrackingModuleDefinition.EMOTE_TRACKING) .module(EmoteTrackingModuleDefinition.EMOTE_TRACKING)
.templated(true) .templated(true)
.async(true) .async(true)
.messageCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.causesReaction(true) .causesReaction(true)
.parameters(parameters) .parameters(parameters)

View File

@@ -88,12 +88,23 @@ public class ExternalEmoteStats extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
List<Parameter> parameters = new ArrayList<>(); List<Parameter> parameters = new ArrayList<>();
parameters.add(Parameter.builder().name("period").templated(true).optional(true).type(Duration.class).build()); Parameter periodParameter = Parameter
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); .builder()
.name("period")
.templated(true)
.optional(true)
.type(Duration.class)
.build();
parameters.add(periodParameter);
HelpInfo helpInfo = HelpInfo
.builder()
.templated(true)
.build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("externalEmoteStats") .name("externalEmoteStats")
.module(EmoteTrackingModuleDefinition.EMOTE_TRACKING) .module(EmoteTrackingModuleDefinition.EMOTE_TRACKING)
.templated(true) .templated(true)
.messageCommandOnly(true)
.async(true) .async(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.causesReaction(true) .causesReaction(true)

View File

@@ -52,13 +52,27 @@ public class PurgeEmoteStats extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
List<Parameter> parameters = new ArrayList<>(); List<Parameter> parameters = new ArrayList<>();
parameters.add(Parameter.builder().name("trackedEmote").templated(true).type(TrackedEmote.class).build()); Parameter trackedEmoteParameter = Parameter
parameters.add(Parameter.builder().name("period").templated(true).optional(true).type(Duration.class).build()); .builder()
.name("trackedEmote")
.templated(true)
.type(TrackedEmote.class)
.build();
parameters.add(trackedEmoteParameter);
Parameter periodParameter = Parameter
.builder()
.name("period")
.templated(true)
.optional(true)
.type(Duration.class)
.build();
parameters.add(periodParameter);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("purgeEmoteStats") .name("purgeEmoteStats")
.module(EmoteTrackingModuleDefinition.EMOTE_TRACKING) .module(EmoteTrackingModuleDefinition.EMOTE_TRACKING)
.templated(true) .templated(true)
.messageCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.requiresConfirmation(true) .requiresConfirmation(true)
.causesReaction(true) .causesReaction(true)

View File

@@ -38,6 +38,7 @@ public class ResetEmoteStats extends AbstractConditionableCommand {
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("resetEmoteStats") .name("resetEmoteStats")
.messageCommandOnly(true)
.module(EmoteTrackingModuleDefinition.EMOTE_TRACKING) .module(EmoteTrackingModuleDefinition.EMOTE_TRACKING)
.templated(true) .templated(true)
.supportsEmbedException(true) .supportsEmbedException(true)

View File

@@ -55,13 +55,20 @@ public class ShowExternalTrackedEmote extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
List<Parameter> parameters = new ArrayList<>(); List<Parameter> parameters = new ArrayList<>();
parameters.add(Parameter.builder().name("trackedEmote").templated(true).type(TrackedEmote.class).build()); Parameter trackedEmoteParameter = Parameter
.builder()
.name("trackedEmote")
.templated(true)
.type(TrackedEmote.class)
.build();
parameters.add(trackedEmoteParameter);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("showExternalTrackedEmote") .name("showExternalTrackedEmote")
.module(EmoteTrackingModuleDefinition.EMOTE_TRACKING) .module(EmoteTrackingModuleDefinition.EMOTE_TRACKING)
.templated(true) .templated(true)
.async(true) .async(true)
.messageCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.causesReaction(true) .causesReaction(true)
.parameters(parameters) .parameters(parameters)

View File

@@ -114,12 +114,20 @@ public class ShowTrackedEmotes extends AbstractConditionableCommand {
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
List<Parameter> parameters = new ArrayList<>(); List<Parameter> parameters = new ArrayList<>();
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
parameters.add(Parameter.builder().name("showAll").templated(true).optional(true).type(Boolean.class).build()); Parameter showAllParameter = Parameter
.builder()
.name("showAll")
.templated(true)
.optional(true)
.type(Boolean.class)
.build();
parameters.add(showAllParameter);
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("showTrackedEmotes") .name("showTrackedEmotes")
.module(EmoteTrackingModuleDefinition.EMOTE_TRACKING) .module(EmoteTrackingModuleDefinition.EMOTE_TRACKING)
.templated(true) .templated(true)
.async(true) .async(true)
.messageCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.causesReaction(true) .causesReaction(true)
.parameters(parameters) .parameters(parameters)

View File

@@ -46,11 +46,15 @@ public class SyncTrackedEmotes extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
List<Parameter> parameters = new ArrayList<>(); List<Parameter> parameters = new ArrayList<>();
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo
.builder()
.templated(true)
.build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("syncTrackedEmotes") .name("syncTrackedEmotes")
.module(EmoteTrackingModuleDefinition.EMOTE_TRACKING) .module(EmoteTrackingModuleDefinition.EMOTE_TRACKING)
.templated(true) .templated(true)
.messageCommandOnly(true)
.async(true) .async(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.causesReaction(true) .causesReaction(true)

View File

@@ -69,12 +69,19 @@ public class TrackEmote extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
List<Parameter> parameters = new ArrayList<>(); List<Parameter> parameters = new ArrayList<>();
parameters.add(Parameter.builder().name("emote").templated(true).type(TrackEmoteParameter.class).build()); Parameter emoteParameter = Parameter
.builder()
.name("emote")
.templated(true)
.type(TrackEmoteParameter.class)
.build();
parameters.add(emoteParameter);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("trackEmote") .name("trackEmote")
.module(EmoteTrackingModuleDefinition.EMOTE_TRACKING) .module(EmoteTrackingModuleDefinition.EMOTE_TRACKING)
.templated(true) .templated(true)
.messageCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.causesReaction(true) .causesReaction(true)
.parameters(parameters) .parameters(parameters)

View File

@@ -80,6 +80,7 @@ public class CancelPoll extends AbstractConditionableCommand {
.name(CANCEL_POLL_COMMAND) .name(CANCEL_POLL_COMMAND)
.module(UtilityModuleDefinition.UTILITY) .module(UtilityModuleDefinition.UTILITY)
.templated(true) .templated(true)
.slashCommandOnly(true)
.slashCommandConfig(slashCommandConfig) .slashCommandConfig(slashCommandConfig)
.async(true) .async(true)
.supportsEmbedException(true) .supportsEmbedException(true)

View File

@@ -54,11 +54,6 @@ public class ClosePoll extends AbstractConditionableCommand {
.thenApply(aVoid -> CommandResult.fromSuccess()); .thenApply(aVoid -> CommandResult.fromSuccess());
} }
@Override
public FeatureDefinition getFeature() {
return SuggestionFeatureDefinition.POLL;
}
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
List<ParameterValidator> pollIdValidator = Arrays.asList(MinIntegerValueValidator.min(1L)); List<ParameterValidator> pollIdValidator = Arrays.asList(MinIntegerValueValidator.min(1L));
@@ -94,6 +89,7 @@ public class ClosePoll extends AbstractConditionableCommand {
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name(CLOSE_POLL_COMMAND) .name(CLOSE_POLL_COMMAND)
.slashCommandOnly(true)
.module(UtilityModuleDefinition.UTILITY) .module(UtilityModuleDefinition.UTILITY)
.templated(true) .templated(true)
.slashCommandConfig(slashCommandConfig) .slashCommandConfig(slashCommandConfig)
@@ -104,4 +100,9 @@ public class ClosePoll extends AbstractConditionableCommand {
.help(helpInfo) .help(helpInfo)
.build(); .build();
} }
@Override
public FeatureDefinition getFeature() {
return SuggestionFeatureDefinition.POLL;
}
} }

View File

@@ -156,6 +156,7 @@ public class Poll extends AbstractConditionableCommand {
.name(POLL_COMMAND) .name(POLL_COMMAND)
.module(UtilityModuleDefinition.UTILITY) .module(UtilityModuleDefinition.UTILITY)
.templated(true) .templated(true)
.slashCommandOnly(true)
.async(true) .async(true)
.slashCommandConfig(slashCommandConfig) .slashCommandConfig(slashCommandConfig)
.supportsEmbedException(true) .supportsEmbedException(true)

View File

@@ -141,6 +141,7 @@ public class QuickPoll extends AbstractConditionableCommand {
.name(POLL_COMMAND) .name(POLL_COMMAND)
.module(UtilityModuleDefinition.UTILITY) .module(UtilityModuleDefinition.UTILITY)
.templated(true) .templated(true)
.slashCommandOnly(true)
.async(true) .async(true)
.slashCommandConfig(slashCommandConfig) .slashCommandConfig(slashCommandConfig)
.supportsEmbedException(true) .supportsEmbedException(true)

View File

@@ -81,6 +81,7 @@ public class ShowPoll extends AbstractConditionableCommand {
.module(UtilityModuleDefinition.UTILITY) .module(UtilityModuleDefinition.UTILITY)
.templated(true) .templated(true)
.async(true) .async(true)
.slashCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.causesReaction(false) .causesReaction(false)
.parameters(parameters) .parameters(parameters)

View File

@@ -119,6 +119,7 @@ public class AddTwitchStreamer extends AbstractConditionableCommand {
.slashCommandConfig(slashCommandConfig) .slashCommandConfig(slashCommandConfig)
.supportsEmbedException(true) .supportsEmbedException(true)
.causesReaction(true) .causesReaction(true)
.slashCommandOnly(true)
.parameters(parameters) .parameters(parameters)
.help(helpInfo) .help(helpInfo)
.build(); .build();

View File

@@ -148,6 +148,7 @@ public class ChangeTwitchStreamer extends AbstractConditionableCommand {
.name(CHANGE_STREAMER_COMMAND) .name(CHANGE_STREAMER_COMMAND)
.module(UtilityModuleDefinition.UTILITY) .module(UtilityModuleDefinition.UTILITY)
.templated(true) .templated(true)
.slashCommandOnly(true)
.async(true) .async(true)
.slashCommandConfig(slashCommandConfig) .slashCommandConfig(slashCommandConfig)
.supportsEmbedException(true) .supportsEmbedException(true)

View File

@@ -58,6 +58,7 @@ public class ListTwitchStreamer extends AbstractConditionableCommand {
.module(UtilityModuleDefinition.UTILITY) .module(UtilityModuleDefinition.UTILITY)
.templated(true) .templated(true)
.async(true) .async(true)
.slashCommandOnly(true)
.slashCommandConfig(slashCommandConfig) .slashCommandConfig(slashCommandConfig)
.supportsEmbedException(true) .supportsEmbedException(true)
.causesReaction(true) .causesReaction(true)

View File

@@ -76,6 +76,7 @@ public class RemoveTwitchStreamer extends AbstractConditionableCommand {
.async(true) .async(true)
.slashCommandConfig(slashCommandConfig) .slashCommandConfig(slashCommandConfig)
.supportsEmbedException(true) .supportsEmbedException(true)
.slashCommandOnly(true)
.causesReaction(true) .causesReaction(true)
.parameters(parameters) .parameters(parameters)
.help(helpInfo) .help(helpInfo)

View File

@@ -70,6 +70,7 @@ public class ShowEmote extends AbstractConditionableCommand {
.module(UtilityModuleDefinition.UTILITY) .module(UtilityModuleDefinition.UTILITY)
.templated(true) .templated(true)
.async(true) .async(true)
.messageCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.causesReaction(false) .causesReaction(false)
.parameters(parameters) .parameters(parameters)

View File

@@ -35,14 +35,28 @@ public class CreateVoiceChannelContext extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter voiceChannel = Parameter.builder().name("voiceChannel").type(VoiceChannel.class).templated(true).build(); Parameter voiceChannel = Parameter
Parameter contextRole = Parameter.builder().name("role").type(Role.class).templated(true).build(); .builder()
.name("voiceChannel")
.type(VoiceChannel.class)
.templated(true)
.build();
Parameter contextRole = Parameter
.builder()
.name("role")
.type(Role.class)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(voiceChannel, contextRole); List<Parameter> parameters = Arrays.asList(voiceChannel, contextRole);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo
.builder()
.templated(true)
.build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("createVoiceChannelContext") .name("createVoiceChannelContext")
.module(UtilityModuleDefinition.UTILITY) .module(UtilityModuleDefinition.UTILITY)
.templated(true) .templated(true)
.messageCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.causesReaction(true) .causesReaction(true)
.parameters(parameters) .parameters(parameters)

View File

@@ -38,13 +38,19 @@ public class DeleteVoiceChannelContext extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter voiceChannel = Parameter.builder().name("channel").type(AChannel.class).templated(true).build(); Parameter voiceChannel = Parameter
.builder()
.name("channel")
.type(AChannel.class)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(voiceChannel); List<Parameter> parameters = Arrays.asList(voiceChannel);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("deleteVoiceChannelContext") .name("deleteVoiceChannelContext")
.module(UtilityModuleDefinition.UTILITY) .module(UtilityModuleDefinition.UTILITY)
.templated(true) .templated(true)
.messageCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.causesReaction(true) .causesReaction(true)
.parameters(parameters) .parameters(parameters)

View File

@@ -83,6 +83,7 @@ public class ThreadReaderCommand extends AbstractConditionableCommand {
.module(UtilityModuleDefinition.UTILITY) .module(UtilityModuleDefinition.UTILITY)
.templated(true) .templated(true)
.async(true) .async(true)
.messageCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.parameters(parameters) .parameters(parameters)
.help(helpInfo) .help(helpInfo)

View File

@@ -31,15 +31,29 @@ public class AddCommandToChannelGroup extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter channelGroupName = Parameter.builder().name("channelGroupName").type(String.class).templated(true).build(); Parameter channelGroupName = Parameter
Parameter commandName = Parameter.builder().name("commandName").type(String.class).templated(true).build(); .builder()
.name("channelGroupName")
.type(String.class)
.templated(true)
.build();
Parameter commandName = Parameter
.builder()
.name("commandName")
.type(String.class)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(channelGroupName, commandName); List<Parameter> parameters = Arrays.asList(channelGroupName, commandName);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo
.builder()
.templated(true)
.build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("addCommandToChannelGroup") .name("addCommandToChannelGroup")
.module(ChannelsModuleDefinition.CHANNELS) .module(ChannelsModuleDefinition.CHANNELS)
.parameters(parameters) .parameters(parameters)
.supportsEmbedException(true) .supportsEmbedException(true)
.messageCommandOnly(true)
.help(helpInfo) .help(helpInfo)
.templated(true) .templated(true)
.causesReaction(true) .causesReaction(true)

View File

@@ -32,14 +32,29 @@ public class DisableCommand extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter commandName = Parameter.builder().name("commandName").type(String.class).templated(true).build(); Parameter commandName = Parameter
Parameter channelGroupName = Parameter.builder().name("channelGroupName").type(String.class).templated(true).build(); .builder()
.name("commandName")
.type(String.class)
.templated(true)
.build();
Parameter channelGroupName = Parameter
.builder()
.name("channelGroupName")
.type(String.class)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(commandName, channelGroupName); List<Parameter> parameters = Arrays.asList(commandName, channelGroupName);
HelpInfo helpInfo = HelpInfo.builder().templated(true).hasExample(true).build(); HelpInfo helpInfo = HelpInfo
.builder()
.templated(true)
.hasExample(true)
.build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("disableCommand") .name("disableCommand")
.module(ChannelsModuleDefinition.CHANNELS) .module(ChannelsModuleDefinition.CHANNELS)
.parameters(parameters) .parameters(parameters)
.messageCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.help(helpInfo) .help(helpInfo)
.templated(true) .templated(true)

View File

@@ -32,14 +32,25 @@ public class EnableCommand extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter commandName = Parameter.builder().name("commandName").type(String.class).templated(true).build(); Parameter commandName = Parameter
Parameter channelGroupname = Parameter.builder().name("channelGroupName").type(String.class).templated(true).build(); .builder()
List<Parameter> parameters = Arrays.asList(commandName, channelGroupname); .name("commandName")
.type(String.class)
.templated(true)
.build();
Parameter channelGroupName = Parameter
.builder()
.name("channelGroupName")
.type(String.class)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(commandName, channelGroupName);
HelpInfo helpInfo = HelpInfo.builder().templated(true).hasExample(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).hasExample(true).build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("enableCommand") .name("enableCommand")
.module(ChannelsModuleDefinition.CHANNELS) .module(ChannelsModuleDefinition.CHANNELS)
.parameters(parameters) .parameters(parameters)
.messageCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.templated(true) .templated(true)
.help(helpInfo) .help(helpInfo)

View File

@@ -31,13 +31,24 @@ public class RemoveCommandFromChannelGroup extends AbstractConditionableCommand
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter channelGroupName = Parameter.builder().name("channelGroupName").type(String.class).templated(true).build(); Parameter channelGroupName = Parameter
Parameter commandName = Parameter.builder().name("commandName").type(String.class).templated(true).build(); .builder()
.name("channelGroupName")
.type(String.class)
.templated(true)
.build();
Parameter commandName = Parameter
.builder()
.name("commandName")
.type(String.class)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(channelGroupName, commandName); List<Parameter> parameters = Arrays.asList(channelGroupName, commandName);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("removeCommandFromChannelGroup") .name("removeCommandFromChannelGroup")
.module(ChannelsModuleDefinition.CHANNELS) .module(ChannelsModuleDefinition.CHANNELS)
.messageCommandOnly(true)
.parameters(parameters) .parameters(parameters)
.supportsEmbedException(true) .supportsEmbedException(true)
.help(helpInfo) .help(helpInfo)

View File

@@ -32,15 +32,29 @@ public class CreateAlias extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter commandNameParameter = Parameter.builder().name("commandName").type(String.class).templated(true).build(); Parameter commandNameParameter = Parameter
Parameter aliasParameter = Parameter.builder().name("alias").type(String.class).templated(true).build(); .builder()
.name("commandName")
.type(String.class)
.templated(true)
.build();
Parameter aliasParameter = Parameter
.builder()
.name("alias")
.type(String.class)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(commandNameParameter, aliasParameter); List<Parameter> parameters = Arrays.asList(commandNameParameter, aliasParameter);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo
.builder()
.templated(true)
.build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("createAlias") .name("createAlias")
.module(ConfigModuleDefinition.CONFIG) .module(ConfigModuleDefinition.CONFIG)
.parameters(parameters) .parameters(parameters)
.templated(true) .templated(true)
.messageCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.help(helpInfo) .help(helpInfo)
.causesReaction(true) .causesReaction(true)

View File

@@ -31,14 +31,23 @@ public class DeleteAlias extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter aliasParameter = Parameter.builder().name("alias").type(String.class).templated(true).build(); Parameter aliasParameter = Parameter
.builder()
.name("alias")
.type(String.class)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(aliasParameter); List<Parameter> parameters = Arrays.asList(aliasParameter);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo
.builder()
.templated(true)
.build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("deleteAlias") .name("deleteAlias")
.module(ConfigModuleDefinition.CONFIG) .module(ConfigModuleDefinition.CONFIG)
.parameters(parameters) .parameters(parameters)
.templated(true) .templated(true)
.messageCommandOnly(true)
.requiresConfirmation(true) .requiresConfirmation(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.help(helpInfo) .help(helpInfo)

View File

@@ -30,13 +30,19 @@ public class SetAdminMode extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter valueToSet = Parameter.builder().name("value").type(Boolean.class).templated(true).build(); Parameter valueToSet = Parameter
.builder()
.name("value")
.type(Boolean.class)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(valueToSet); List<Parameter> parameters = Arrays.asList(valueToSet);
HelpInfo helpInfo = HelpInfo.builder().templated(true).hasExample(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).hasExample(true).build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("setAdminMode") .name("setAdminMode")
.module(ConfigModuleDefinition.CONFIG) .module(ConfigModuleDefinition.CONFIG)
.parameters(parameters) .parameters(parameters)
.messageCommandOnly(true)
.templated(true) .templated(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.help(helpInfo) .help(helpInfo)

View File

@@ -33,11 +33,21 @@ public class SetPrefix extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
List<ParameterValidator> validators = Arrays.asList(MaxStringLengthValidator.max(10L)); List<ParameterValidator> validators = Arrays.asList(MaxStringLengthValidator.max(10L));
Parameter newPrefixParameter = Parameter.builder().name("prefix").validators(validators).type(String.class).templated(true).build(); Parameter newPrefixParameter = Parameter
.builder()
.name("prefix")
.validators(validators)
.type(String.class)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(newPrefixParameter); List<Parameter> parameters = Arrays.asList(newPrefixParameter);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo
.builder()
.templated(true)
.build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("setPrefix") .name("setPrefix")
.messageCommandOnly(true)
.module(ConfigModuleDefinition.CONFIG) .module(ConfigModuleDefinition.CONFIG)
.parameters(parameters) .parameters(parameters)
.supportsEmbedException(true) .supportsEmbedException(true)

View File

@@ -26,11 +26,15 @@ public class ClearCommandCoolDowns extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo
.builder()
.templated(true)
.build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("clearCommandCoolDowns") .name("clearCommandCoolDowns")
.module(ConfigModuleDefinition.CONFIG) .module(ConfigModuleDefinition.CONFIG)
.templated(true) .templated(true)
.messageCommandOnly(true)
.help(helpInfo) .help(helpInfo)
.causesReaction(true) .causesReaction(true)
.build(); .build();

View File

@@ -49,15 +49,31 @@ public class CommandCoolDownChannelGroup extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter channelGroupName = Parameter.builder().name("channelGroupName").templated(true).type(AChannelGroup.class).build(); Parameter channelGroupName = Parameter
Parameter channelDuration = Parameter.builder().name("channelDuration").templated(true).type(Duration.class).build(); .builder()
Parameter memberDuration = Parameter.builder().name("memberDuration").templated(true).type(Duration.class).build(); .name("channelGroupName")
.templated(true)
.type(AChannelGroup.class)
.build();
Parameter channelDuration = Parameter
.builder()
.name("channelDuration")
.templated(true)
.type(Duration.class)
.build();
Parameter memberDuration = Parameter
.builder()
.name("memberDuration")
.templated(true)
.type(Duration.class)
.build();
List<Parameter> parameters = Arrays.asList(channelGroupName, channelDuration, memberDuration); List<Parameter> parameters = Arrays.asList(channelGroupName, channelDuration, memberDuration);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("commandCoolDownChannelGroup") .name("commandCoolDownChannelGroup")
.module(ConfigModuleDefinition.CONFIG) .module(ConfigModuleDefinition.CONFIG)
.parameters(parameters) .parameters(parameters)
.messageCommandOnly(true)
.templated(true) .templated(true)
.help(helpInfo) .help(helpInfo)
.causesReaction(true) .causesReaction(true)

View File

@@ -42,14 +42,25 @@ public class CommandCoolDownServer extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter commandName = Parameter.builder().name("command").templated(true).type(String.class).build(); Parameter commandName = Parameter
Parameter coolDownDuration = Parameter.builder().name("duration").templated(true).type(Duration.class).build(); .builder()
.name("command")
.templated(true)
.type(String.class)
.build();
Parameter coolDownDuration = Parameter
.builder()
.name("duration")
.templated(true)
.type(Duration.class)
.build();
List<Parameter> parameters = Arrays.asList(commandName, coolDownDuration); List<Parameter> parameters = Arrays.asList(commandName, coolDownDuration);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("commandCoolDownServer") .name("commandCoolDownServer")
.module(ConfigModuleDefinition.CONFIG) .module(ConfigModuleDefinition.CONFIG)
.parameters(parameters) .parameters(parameters)
.messageCommandOnly(true)
.templated(true) .templated(true)
.help(helpInfo) .help(helpInfo)
.causesReaction(true) .causesReaction(true)

View File

@@ -73,6 +73,7 @@ public class RemoveCommandMemberCooldown extends AbstractConditionableCommand {
.parameters(parameters) .parameters(parameters)
.slashCommandConfig(slashCommandConfig) .slashCommandConfig(slashCommandConfig)
.templated(true) .templated(true)
.slashCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.help(helpInfo) .help(helpInfo)
.causesReaction(true) .causesReaction(true)

View File

@@ -82,6 +82,7 @@ public class SetCommandMemberCooldown extends AbstractConditionableCommand {
.name(SET_COMMAND_MEMBER_COOLDOWN) .name(SET_COMMAND_MEMBER_COOLDOWN)
.module(ConfigModuleDefinition.CONFIG) .module(ConfigModuleDefinition.CONFIG)
.parameters(parameters) .parameters(parameters)
.slashCommandOnly(true)
.slashCommandConfig(slashCommandConfig) .slashCommandConfig(slashCommandConfig)
.templated(true) .templated(true)
.supportsEmbedException(true) .supportsEmbedException(true)

View File

@@ -63,11 +63,17 @@ public class Allow extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter featureName = Parameter.builder().name("component").templated(true).type(String.class).build(); Parameter featureName = Parameter
.builder()
.name("component")
.templated(true)
.type(String.class)
.build();
List<Parameter> parameters = Arrays.asList(featureName); List<Parameter> parameters = Arrays.asList(featureName);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("allow") .name("allow")
.messageCommandOnly(true)
.module(ConfigModuleDefinition.CONFIG) .module(ConfigModuleDefinition.CONFIG)
.parameters(parameters) .parameters(parameters)
.templated(true) .templated(true)

View File

@@ -68,16 +68,31 @@ public class AllowRole extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter featureName = Parameter.builder().name("component").type(String.class).templated(true).build(); Parameter featureName = Parameter
Parameter role = Parameter.builder().name("role").type(ARole.class).templated(true).build(); .builder()
.name("component")
.type(String.class)
.templated(true)
.build();
Parameter role = Parameter
.builder()
.name("role")
.type(ARole.class)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(featureName, role); List<Parameter> parameters = Arrays.asList(featureName, role);
HelpInfo helpInfo = HelpInfo.builder().templated(true).hasExample(true).build(); HelpInfo helpInfo = HelpInfo
.builder()
.templated(true)
.hasExample(true)
.build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("allowRole") .name("allowRole")
.module(ConfigModuleDefinition.CONFIG) .module(ConfigModuleDefinition.CONFIG)
.parameters(parameters) .parameters(parameters)
.templated(true) .templated(true)
.help(helpInfo) .help(helpInfo)
.messageCommandOnly(true)
.causesReaction(true) .causesReaction(true)
.build(); .build();
} }

View File

@@ -68,15 +68,30 @@ public class DisAllowRole extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter featureName = Parameter.builder().name("component").type(String.class).templated(true).build(); Parameter featureName = Parameter
Parameter role = Parameter.builder().name("role").type(ARole.class).templated(true).build(); .builder()
.name("component")
.type(String.class)
.templated(true)
.build();
Parameter role = Parameter
.builder()
.name("role")
.type(ARole.class)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(featureName, role); List<Parameter> parameters = Arrays.asList(featureName, role);
HelpInfo helpInfo = HelpInfo.builder().templated(true).hasExample(true).build(); HelpInfo helpInfo = HelpInfo
.builder()
.templated(true)
.hasExample(true)
.build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("disAllowRole") .name("disAllowRole")
.module(ConfigModuleDefinition.CONFIG) .module(ConfigModuleDefinition.CONFIG)
.parameters(parameters) .parameters(parameters)
.help(helpInfo) .help(helpInfo)
.messageCommandOnly(true)
.templated(true) .templated(true)
.causesReaction(true) .causesReaction(true)
.build(); .build();

View File

@@ -68,11 +68,17 @@ public class Restrict extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter featureName = Parameter.builder().name("component").type(String.class).templated(true).build(); Parameter featureName = Parameter
.builder()
.name("component")
.type(String.class)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(featureName); List<Parameter> parameters = Arrays.asList(featureName);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("restrict") .name("restrict")
.messageCommandOnly(true)
.module(ConfigModuleDefinition.CONFIG) .module(ConfigModuleDefinition.CONFIG)
.parameters(parameters) .parameters(parameters)
.templated(true) .templated(true)

View File

@@ -57,13 +57,21 @@ public class SetupFeature extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter newPrefixParameter = Parameter.builder().name("feature").type(String.class).build(); Parameter newPrefixParameter = Parameter
.builder()
.name("feature")
.type(String.class)
.build();
List<Parameter> parameters = Arrays.asList(newPrefixParameter); List<Parameter> parameters = Arrays.asList(newPrefixParameter);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo
.builder()
.templated(true)
.build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("setupFeature") .name("setupFeature")
.module(ConfigModuleDefinition.CONFIG) .module(ConfigModuleDefinition.CONFIG)
.parameters(parameters) .parameters(parameters)
.messageCommandOnly(true)
.templated(true) .templated(true)
.async(true) .async(true)
.supportsEmbedException(true) .supportsEmbedException(true)

View File

@@ -32,13 +32,19 @@ public class AllowMention extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter mentionTypeParameter = Parameter.builder().name("mentionType").type(String.class).templated(true).build(); Parameter mentionTypeParameter = Parameter
.builder()
.name("mentionType")
.type(String.class)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(mentionTypeParameter); List<Parameter> parameters = Arrays.asList(mentionTypeParameter);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo.builder().templated(true).build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("allowMention") .name("allowMention")
.module(ConfigModuleDefinition.CONFIG) .module(ConfigModuleDefinition.CONFIG)
.parameters(parameters) .parameters(parameters)
.messageCommandOnly(true)
.templated(true) .templated(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.help(helpInfo) .help(helpInfo)

View File

@@ -33,14 +33,23 @@ public class DisallowMention extends AbstractConditionableCommand {
@Override @Override
public CommandConfiguration getConfiguration() { public CommandConfiguration getConfiguration() {
Parameter mentionTypeParameter = Parameter.builder().name("mentionType").type(String.class).templated(true).build(); Parameter mentionTypeParameter = Parameter
.builder()
.name("mentionType")
.type(String.class)
.templated(true)
.build();
List<Parameter> parameters = Arrays.asList(mentionTypeParameter); List<Parameter> parameters = Arrays.asList(mentionTypeParameter);
HelpInfo helpInfo = HelpInfo.builder().templated(true).build(); HelpInfo helpInfo = HelpInfo
.builder()
.templated(true)
.build();
return CommandConfiguration.builder() return CommandConfiguration.builder()
.name("disallowMention") .name("disallowMention")
.module(ConfigModuleDefinition.CONFIG) .module(ConfigModuleDefinition.CONFIG)
.parameters(parameters) .parameters(parameters)
.templated(true) .templated(true)
.messageCommandOnly(true)
.supportsEmbedException(true) .supportsEmbedException(true)
.help(helpInfo) .help(helpInfo)
.causesReaction(true) .causesReaction(true)

View File

@@ -176,7 +176,7 @@ public class Help extends AbstractConditionableCommand {
.getEffects() .getEffects()
.stream() .stream()
.map(EffectConfig::getEffectKey) .map(EffectConfig::getEffectKey)
.collect(Collectors.toList()); .toList();
if(!effects.isEmpty()) { if(!effects.isEmpty()) {
model.setEffects(effects); model.setEffects(effects);
} }
@@ -237,6 +237,7 @@ public class Help extends AbstractConditionableCommand {
.module(SupportModuleDefinition.SUPPORT) .module(SupportModuleDefinition.SUPPORT)
.parameters(Collections.singletonList(moduleOrCommandName)) .parameters(Collections.singletonList(moduleOrCommandName))
.help(helpInfo) .help(helpInfo)
.messageCommandOnly(true)
.templated(true) .templated(true)
.causesReaction(true) .causesReaction(true)
.build(); .build();

View File

@@ -0,0 +1,10 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd">
<include file="tables/tables.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

View File

@@ -0,0 +1,14 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
<changeSet author="Sheldan" id="custom_template-resize_content">
<modifyDataType columnName="content"
newDataType="VARCHAR(16000)"
tableName="custom_template"/>
</changeSet>
</databaseChangeLog>

View File

@@ -0,0 +1,11 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
<include file="template.xml" relativeToChangelogFile="true"/>
<include file="custom_template.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

View File

@@ -0,0 +1,14 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
<changeSet author="Sheldan" id="template-resize_content">
<modifyDataType columnName="content"
newDataType="VARCHAR(16000)"
tableName="template"/>
</changeSet>
</databaseChangeLog>

View File

@@ -25,4 +25,5 @@
<include file="1.3.13/collection.xml" relativeToChangelogFile="true"/> <include file="1.3.13/collection.xml" relativeToChangelogFile="true"/>
<include file="1.4.0/collection.xml" relativeToChangelogFile="true"/> <include file="1.4.0/collection.xml" relativeToChangelogFile="true"/>
<include file="1.5.8/collection.xml" relativeToChangelogFile="true"/> <include file="1.5.8/collection.xml" relativeToChangelogFile="true"/>
<include file="1.5.10/collection.xml" relativeToChangelogFile="true"/>
</databaseChangeLog> </databaseChangeLog>

View File

@@ -42,6 +42,12 @@ public class CommandConfiguration {
@Builder.Default @Builder.Default
private boolean supportsMessageCommand = true; private boolean supportsMessageCommand = true;
@Builder.Default
private boolean slashCommandOnly = false;
@Builder.Default
private boolean messageCommandOnly = false;
private CommandCoolDownConfig coolDownConfig; private CommandCoolDownConfig coolDownConfig;
@Builder.Default @Builder.Default