diff --git a/application/src/main/java/org/togetherjava/tjbot/commands/moderation/temp/TemporaryModerationRoutine.java b/application/src/main/java/org/togetherjava/tjbot/commands/moderation/temp/TemporaryModerationRoutine.java index 215f766466..45fa89203a 100644 --- a/application/src/main/java/org/togetherjava/tjbot/commands/moderation/temp/TemporaryModerationRoutine.java +++ b/application/src/main/java/org/togetherjava/tjbot/commands/moderation/temp/TemporaryModerationRoutine.java @@ -125,12 +125,13 @@ private void revokeAction(@NotNull RevocationGroupIdentifier groupIdentifier) { @NotNull ModerationAction actionType) { logger.info("Revoked temporary action {} against user '{}' ({}).", actionType, target.getAsTag(), target.getId()); + RevocableModerationAction action = getRevocableActionByType(actionType); String reason = "Automatic revocation of temporary action."; actionsStore.addAction(guild.getIdLong(), jda.getSelfUser().getIdLong(), target.getIdLong(), - actionType, null, reason); + action.getRevokeType(), null, reason); - return getRevocableActionByType(actionType).revokeAction(guild, target, reason); + return action.revokeAction(guild, target, reason); } private void handleFailure(@NotNull Throwable failure,