From 0f04908d5aca97ba5ccc01b61dd780ef8496055c Mon Sep 17 00:00:00 2001 From: alphaBEE Date: Wed, 30 Oct 2024 20:55:55 +0530 Subject: [PATCH] add a comma in template config and document constructor for project listener (#1192) minor fix in project listener related to config and documentation --- application/config.json.template | 2 +- .../features/projects/ProjectsThreadCreatedListener.java | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/application/config.json.template b/application/config.json.template index ec8737824d..b5b591eff1 100644 --- a/application/config.json.template +++ b/application/config.json.template @@ -6,7 +6,7 @@ "discordGuildInvite": "https://discord.com/invite/XXFUXzK", "modAuditLogChannelPattern": "mod-audit-log", "modMailChannelPattern": "modmail", - "projectsChannelPattern": "projects" + "projectsChannelPattern": "projects", "mutedRolePattern": "Muted", "heavyModerationRolePattern": "Moderator", "softModerationRolePattern": "Moderator|Community Ambassador", diff --git a/application/src/main/java/org/togetherjava/tjbot/features/projects/ProjectsThreadCreatedListener.java b/application/src/main/java/org/togetherjava/tjbot/features/projects/ProjectsThreadCreatedListener.java index 74c961594f..18f51e9fe4 100644 --- a/application/src/main/java/org/togetherjava/tjbot/features/projects/ProjectsThreadCreatedListener.java +++ b/application/src/main/java/org/togetherjava/tjbot/features/projects/ProjectsThreadCreatedListener.java @@ -25,6 +25,12 @@ public final class ProjectsThreadCreatedListener extends ListenerAdapter impleme .expireAfterAccess(2, TimeUnit.of(ChronoUnit.MINUTES)) .build(); + /** + * Creates a new instance. + * + * @param config to work with the project related threads + */ + public ProjectsThreadCreatedListener(Config config) { configProjectsChannelPattern = config.getProjectsChannelPattern(); }