Skip to content

Commit eb01f23

Browse files
Merge pull request #348 from danthe1st/qotw-view
fix locking of QOTW-view answer threads
2 parents 5f12bc7 + 029403b commit eb01f23

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/net/javadiscord/javabot/systems/qotw/commands/view/QOTWViewAnswerSubcommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public void execute(@NotNull SlashCommandInteractionEvent event) {
8080
.toList(),
8181
thread -> {
8282
Responses.success(event.getHook(), "View Answer", "Answer copied successfully").queue();
83-
thread.getManager().setLocked(true).queue();
83+
thread.getManager().setLocked(true).setArchived(true).queue();
8484
})),
8585
() -> Responses.error(event.getHook(), "The QOTW-Submission thread was not found.").queue()));
8686
});

src/main/java/net/javadiscord/javabot/util/MessageActionUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ public static void copyMessagesToNewThread(StandardGuildMessageChannel targetCha
9494
for (Message m : messages) {
9595
future = future.thenCompose(unused -> WebhookUtil.mirrorMessageToWebhook(wh, m, m.getContentRaw(), thread.getIdLong()));
9696
}
97+
future.thenAccept(unused -> onFinish.accept(thread));
9798
});
98-
onFinish.accept(thread);
9999
}
100100
));
101101
}

0 commit comments

Comments
 (0)