Skip to content

Commit 58c39ab

Browse files
Made forum posts reusable
1 parent 3ce558a commit 58c39ab

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/net/javadiscord/javabot/data/config/guild/HelpConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public class HelpConfig extends GuildConfigItem {
4141
* The message that's sent in a post to tell users that it
4242
* is now marked as dormant and no more messages can be sent.
4343
*/
44-
private String dormantChannelMessageTemplate = "`\uD83D\uDCA4` **Post marked as dormant**\n> This post has been inactive for over %s minutes. It is no longer possible to send messages in this channel.\n> If your question was not answered yet, feel free to create a new post.";
44+
private String dormantChannelMessageTemplate = "`\uD83D\uDCA4` **Post marked as dormant**\n> This post has been inactive for over %s minutes, thus, it has been **archived**.\n> If your question was not answered yet, feel free to re-open this post or create a new one.";
4545

4646
/**
4747
* The message that's sent when a user unreserved a channel where other users

src/main/java/net/javadiscord/javabot/systems/help/HelpForumUpdater.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ private void checkForumPost(@NotNull ThreadChannel post, HelpConfig config) {
5050
long minutesAgo = (Instant.now().getEpochSecond() - latest.getTimeCreated().toEpochSecond()) / 60;
5151
if (minutesAgo > config.getInactivityTimeoutMinutes() || isThanksMessage(latest) && minutesAgo > config.getRemoveThanksTimeoutMinutes()) {
5252
post.sendMessage(config.getDormantChannelMessageTemplate().formatted(config.getInactivityTimeoutMinutes())).queue(s -> {
53-
post.getManager().setLocked(true).setArchived(true).queue();
54-
log.info("Archived & locked forum thread '{}' (by {}) for inactivity (last message sent {} minutes ago)",
53+
post.getManager().setArchived(true).queue();
54+
log.info("Archived forum thread '{}' (by {}) for inactivity (last message sent {} minutes ago)",
5555
post.getName(), post.getOwnerId(), minutesAgo);
5656
});
5757
}

0 commit comments

Comments
 (0)