[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

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

View File

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

View File

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