@@ -39,7 +39,10 @@ public final class Config {
39
39
private final String openaiApiKey ;
40
40
private final String sourceCodeBaseUrl ;
41
41
private final JShellConfig jshell ;
42
- private final OofsAndLmaosConfig oofsAndLmaos ;
42
+ private final StarboardConfig starboard ;
43
+ private final HelperPruneConfig helperPruneConfig ;
44
+ private final FeatureBlacklistConfig featureBlacklistConfig ;
45
+
43
46
44
47
@ SuppressWarnings ("ConstructorWithTooManyParameters" )
45
48
@ JsonCreator (mode = JsonCreator .Mode .PROPERTIES )
@@ -77,8 +80,12 @@ private Config(@JsonProperty(value = "token", required = true) String token,
77
80
required = true ) String logErrorChannelWebhook ,
78
81
@ JsonProperty (value = "openaiApiKey" , required = true ) String openaiApiKey ,
79
82
@ JsonProperty (value = "sourceCodeBaseUrl" , required = true ) String sourceCodeBaseUrl ,
80
- @ JsonProperty (value = "jshell" , required = true ) JShellConfig jshell ,
81
- @ JsonProperty (value = "oofsAndLmaos" , required = true ) OofsAndLmaosConfig oofsAndLmaos ) {
83
+ @ JsonProperty (value = "jshell" , required = true ) JShellConfig jshell ,
84
+ @ JsonProperty (value = "starboard" , required = true ) StarboardConfig starboard ,
85
+ @ JsonProperty (value = "helperPruneConfig" ,
86
+ required = true ) HelperPruneConfig helperPruneConfig ,
87
+ @ JsonProperty (value = "featureBlacklist" ,
88
+ required = true ) FeatureBlacklistConfig featureBlacklistConfig ) {
82
89
this .token = Objects .requireNonNull (token );
83
90
this .gistApiKey = Objects .requireNonNull (gistApiKey );
84
91
this .databasePath = Objects .requireNonNull (databasePath );
@@ -104,7 +111,9 @@ private Config(@JsonProperty(value = "token", required = true) String token,
104
111
this .openaiApiKey = Objects .requireNonNull (openaiApiKey );
105
112
this .sourceCodeBaseUrl = Objects .requireNonNull (sourceCodeBaseUrl );
106
113
this .jshell = Objects .requireNonNull (jshell );
107
- this .oofsAndLmaos = Objects .requireNonNull (oofsAndLmaos );
114
+ this .starboard = Objects .requireNonNull (starboard );
115
+ this .helperPruneConfig = Objects .requireNonNull (helperPruneConfig );
116
+ this .featureBlacklistConfig = Objects .requireNonNull (featureBlacklistConfig );
108
117
}
109
118
110
119
/**
@@ -344,8 +353,35 @@ public String getSourceCodeBaseUrl() {
344
353
*/
345
354
public JShellConfig getJshell () {
346
355
return jshell ;
347
- }
348
- public OofsAndLmaosConfig getOofsAndLmaos () {
349
- return oofsAndLmaos ;
356
+ }
357
+
358
+ /**
359
+ * Gets the config for the Starboard. The starboard displays certain messages in a special
360
+ * channel {@link StarboardConfig#channelPattern()} if a user reacts with one of the recognized
361
+ * emojis{@link StarboardConfig#emojiNames()}
362
+ *
363
+ * @return the config of the Starboard
364
+ */
365
+ public StarboardConfig getStarboard () {
366
+ return starboard ;
367
+ }
368
+
369
+ /**
370
+ * Gets the config for automatic pruning of helper roles.
371
+ *
372
+ * @return the configuration
373
+ */
374
+ public HelperPruneConfig getHelperPruneConfig () {
375
+ return helperPruneConfig ;
376
+ }
377
+
378
+ /**
379
+ * The configuration of blacklisted features.
380
+ *
381
+ * @return configuration of blacklisted features
382
+ */
383
+ public FeatureBlacklistConfig getFeatureBlacklistConfig () {
384
+ return featureBlacklistConfig ;
385
+
350
386
}
351
387
}
0 commit comments