Skip to content

Commit a11088e

Browse files
authored
Removed now obsolete HelperPrune routine (config change) (#1076)
* the original issue was fixed by discord, so the routine is not needed anymore * changes the config, removes entry "helperPruneConfig"
1 parent a1ef33e commit a11088e

File tree

5 files changed

+0
-232
lines changed

5 files changed

+0
-232
lines changed

application/config.json.template

-7
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,6 @@
9797
"rateLimitWindowSeconds": 10,
9898
"rateLimitRequestsInWindow": 3
9999
},
100-
"helperPruneConfig": {
101-
"roleFullLimit": 100,
102-
"roleFullThreshold": 95,
103-
"pruneMemberAmount": 7,
104-
"inactivateAfterDays": 90,
105-
"recentlyJoinedDays": 4
106-
},
107100
"featureBlacklist": {
108101
"normal": [
109102
],

application/src/main/java/org/togetherjava/tjbot/config/Config.java

-13
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ public final class Config {
4141
private final String openaiApiKey;
4242
private final String sourceCodeBaseUrl;
4343
private final JShellConfig jshell;
44-
private final HelperPruneConfig helperPruneConfig;
4544
private final FeatureBlacklistConfig featureBlacklistConfig;
4645
private final String selectRolesChannelPattern;
4746
private final String memberCountCategoryPattern;
@@ -89,8 +88,6 @@ private Config(@JsonProperty(value = "token", required = true) String token,
8988
@JsonProperty(value = "jshell", required = true) JShellConfig jshell,
9089
@JsonProperty(value = "memberCountCategoryPattern",
9190
required = true) String memberCountCategoryPattern,
92-
@JsonProperty(value = "helperPruneConfig",
93-
required = true) HelperPruneConfig helperPruneConfig,
9491
@JsonProperty(value = "featureBlacklist",
9592
required = true) FeatureBlacklistConfig featureBlacklistConfig,
9693
@JsonProperty(value = "selectRolesChannelPattern",
@@ -124,7 +121,6 @@ private Config(@JsonProperty(value = "token", required = true) String token,
124121
this.openaiApiKey = Objects.requireNonNull(openaiApiKey);
125122
this.sourceCodeBaseUrl = Objects.requireNonNull(sourceCodeBaseUrl);
126123
this.jshell = Objects.requireNonNull(jshell);
127-
this.helperPruneConfig = Objects.requireNonNull(helperPruneConfig);
128124
this.featureBlacklistConfig = Objects.requireNonNull(featureBlacklistConfig);
129125
this.selectRolesChannelPattern = Objects.requireNonNull(selectRolesChannelPattern);
130126
}
@@ -382,15 +378,6 @@ public JShellConfig getJshell() {
382378
return jshell;
383379
}
384380

385-
/**
386-
* Gets the config for automatic pruning of helper roles.
387-
*
388-
* @return the configuration
389-
*/
390-
public HelperPruneConfig getHelperPruneConfig() {
391-
return helperPruneConfig;
392-
}
393-
394381
/**
395382
* The configuration of blacklisted features.
396383
*

application/src/main/java/org/togetherjava/tjbot/config/HelperPruneConfig.java

-19
This file was deleted.

application/src/main/java/org/togetherjava/tjbot/features/Features.java

-2
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,6 @@ public static Collection<Feature> createFeatures(JDA jda, Database database, Con
106106
features.add(new ScamHistoryPurgeRoutine(scamHistoryStore));
107107
features.add(new HelpThreadMetadataPurger(database));
108108
features.add(new HelpThreadActivityUpdater(helpSystemHelper));
109-
features
110-
.add(new AutoPruneHelperRoutine(config, helpSystemHelper, modAuditLogWriter, database));
111109
features.add(new HelpThreadAutoArchiver(helpSystemHelper));
112110
features.add(new LeftoverBookmarksCleanupRoutine(bookmarksSystem));
113111
features.add(new MemberCountDisplayRoutine(config));

application/src/main/java/org/togetherjava/tjbot/features/help/AutoPruneHelperRoutine.java

-191
This file was deleted.

0 commit comments

Comments
 (0)