diff --git a/abstracto-application/abstracto-modules/moderation/moderation-impl/src/main/java/dev/sheldan/abstracto/moderation/command/Ban.java b/abstracto-application/abstracto-modules/moderation/moderation-impl/src/main/java/dev/sheldan/abstracto/moderation/command/Ban.java index a547de97b..32204068b 100644 --- a/abstracto-application/abstracto-modules/moderation/moderation-impl/src/main/java/dev/sheldan/abstracto/moderation/command/Ban.java +++ b/abstracto-application/abstracto-modules/moderation/moderation-impl/src/main/java/dev/sheldan/abstracto/moderation/command/Ban.java @@ -40,8 +40,7 @@ public class Ban extends AbstractConditionableCommand { public CompletableFuture executeAsync(CommandContext commandContext) { List parameters = commandContext.getParameters().getParameters(); User user = (User) parameters.get(0); - String defaultReason = templateService.renderSimpleTemplate(BAN_DEFAULT_REASON_TEMPLATE, commandContext.getGuild().getIdLong()); - String reason = parameters.size() == 2 ? (String) parameters.get(1) : defaultReason; + String reason = (String) parameters.get(1); return banService.banUser(user, reason, commandContext.getAuthor(), commandContext.getMessage()) .thenApply(aVoid -> CommandResult.fromSuccess()); @@ -51,7 +50,7 @@ public class Ban extends AbstractConditionableCommand { public CommandConfiguration getConfiguration() { List parameters = new ArrayList<>(); parameters.add(Parameter.builder().name("user").templated(true).type(User.class).build()); - parameters.add(Parameter.builder().name("reason").templated(true).type(String.class).optional(true).remainder(true).build()); + parameters.add(Parameter.builder().name("reason").templated(true).type(String.class).remainder(true).build()); HelpInfo helpInfo = HelpInfo.builder().templated(true).hasExample(true).build(); List effectConfig = Arrays.asList(EffectConfig.builder().position(0).effectKey(BAN_EFFECT_KEY).build()); return CommandConfiguration.builder() diff --git a/abstracto-application/documentation/src/main/docs/asciidoc/modules/moderation.adoc b/abstracto-application/documentation/src/main/docs/asciidoc/modules/moderation.adoc index f8a27efd6..f9ee64e19 100644 --- a/abstracto-application/documentation/src/main/docs/asciidoc/modules/moderation.adoc +++ b/abstracto-application/documentation/src/main/docs/asciidoc/modules/moderation.adoc @@ -9,10 +9,10 @@ Feature key: `moderation` ==== Commands Ban a member:: -* Usage: `ban [reason]` +* Usage: `ban ` * Description: Bans the given `member` with the given optional `reason`. This sends a logging message to the `banLog` post target. -Banning this way does not delete old messages of the member on the server. If the `reason` is not provided, a default reason is used. +Banning this way does not delete old messages of the member on the server. It is also possible to ban users via ID, if they are not part of the server anymore. * Example: `ban @Member bad` in order to ban `Member` with the reason `bad` (the @Member is a user mention) * Required bot permission: `BAN_MEMBERS`