@@ -126,6 +126,19 @@ private void revokeAction(@NotNull RevocationGroupIdentifier groupIdentifier) {
126126 }, failure -> handleFailure (failure , groupIdentifier ));
127127 }
128128
129+ private @ NotNull RestAction <Void > executeRevocation (@ NotNull Guild guild , @ NotNull User target ,
130+ @ NotNull ModerationAction actionType ) {
131+ logger .info ("Revoked temporary action {} against user '{}' ({})." , actionType ,
132+ target .getAsTag (), target .getId ());
133+ RevocableModerationAction action = getRevocableActionByType (actionType );
134+
135+ String reason = "Automatic revocation of temporary action." ;
136+ actionsStore .addAction (guild .getIdLong (), jda .getSelfUser ().getIdLong (), target .getIdLong (),
137+ action .getRevokeType (), null , reason );
138+
139+ return action .revokeAction (guild , target , reason );
140+ }
141+
129142 private void handleFailure (@ NotNull Throwable failure ,
130143 @ NotNull RevocationGroupIdentifier groupIdentifier ) {
131144 if (failure instanceof ErrorResponseException errorResponseException
@@ -140,19 +153,6 @@ private void handleFailure(@NotNull Throwable failure,
140153 groupIdentifier .targetId , failure );
141154 }
142155
143- private @ NotNull RestAction <Void > executeRevocation (@ NotNull Guild guild , @ NotNull User target ,
144- @ NotNull ModerationAction actionType ) {
145- logger .info ("Revoked temporary action {} against user '{}' ({})." , actionType ,
146- target .getAsTag (), target .getId ());
147- RevocableModerationAction action = getRevocableActionByType (actionType );
148-
149- String reason = "Automatic revocation of temporary action." ;
150- actionsStore .addAction (guild .getIdLong (), jda .getSelfUser ().getIdLong (), target .getIdLong (),
151- action .getRevokeType (), null , reason );
152-
153- return action .revokeAction (guild , target , reason );
154- }
155-
156156 private @ NotNull RevocableModerationAction getRevocableActionByType (
157157 @ NotNull ModerationAction type ) {
158158 return Objects .requireNonNull (typeToRevocableAction .get (type ),
0 commit comments