Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public final class Config {
private final JShellConfig jshell;
private final HelperPruneConfig helperPruneConfig;
private final FeatureBlacklistConfig featureBlacklistConfig;
private final String selectRolesChannelPatten;
private final String selectRolesChannelPattern;

@SuppressWarnings("ConstructorWithTooManyParameters")
@JsonCreator(mode = JsonCreator.Mode.PROPERTIES)
Expand Down Expand Up @@ -85,7 +85,7 @@ private Config(@JsonProperty(value = "token", required = true) String token,
@JsonProperty(value = "featureBlacklist",
required = true) FeatureBlacklistConfig featureBlacklistConfig,
@JsonProperty(value = "selectRolesChannelPattern",
required = true) String selectRolesChannelPatten) {
required = true) String selectRolesChannelPattern) {
this.token = Objects.requireNonNull(token);
this.gistApiKey = Objects.requireNonNull(gistApiKey);
this.databasePath = Objects.requireNonNull(databasePath);
Expand Down Expand Up @@ -113,7 +113,7 @@ private Config(@JsonProperty(value = "token", required = true) String token,
this.jshell = Objects.requireNonNull(jshell);
this.helperPruneConfig = Objects.requireNonNull(helperPruneConfig);
this.featureBlacklistConfig = Objects.requireNonNull(featureBlacklistConfig);
this.selectRolesChannelPatten = Objects.requireNonNull(selectRolesChannelPatten);
this.selectRolesChannelPattern = Objects.requireNonNull(selectRolesChannelPattern);
}

/**
Expand Down Expand Up @@ -373,7 +373,13 @@ public FeatureBlacklistConfig getFeatureBlacklistConfig() {
return featureBlacklistConfig;
}

public String getSelectRolesChannelPatten() {
return selectRolesChannelPatten;
/**
* Gets the REGEX pattern used to identify the channel in which users can select their helper
* roles.
*
* @return the channel name pattern
*/
public String getSelectRolesChannelPattern() {
return selectRolesChannelPattern;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public AutoPruneHelperRoutine(Config config, HelpSystemHelper helper,
inactiveAfter = Period.ofDays(helperPruneConfig.inactivateAfterDays());
recentlyJoinedDays = helperPruneConfig.recentlyJoinedDays();
selectYourRolesChannelNamePredicate =
Pattern.compile(config.getSelectRolesChannelPatten()).asMatchPredicate();
Pattern.compile(config.getSelectRolesChannelPattern()).asMatchPredicate();
}

@Override
Expand Down