forked from Together-Java/TJ-Bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDynamicVoiceChatConfig.java
More file actions
30 lines (26 loc) · 1.17 KB
/
DynamicVoiceChatConfig.java
File metadata and controls
30 lines (26 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package org.togetherjava.tjbot.config;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Objects;
import java.util.regex.Pattern;
/**
* Configuration for the dynamic voice chat feature.
*
* @param archiveCategoryPattern the name of the Discord Guild category in which the archived
* channels will go
* @param cleanChannelsAmount the amount of channels to clean once a cleanup is triggered
* @param minimumChannelsAmount the amount of voice channels for the archive category to have before
* a cleanup triggers
*/
public record DynamicVoiceChatConfig(
@JsonProperty(value = "dynamicChannelPatterns",
required = true) List<Pattern> dynamicChannelPatterns,
@JsonProperty(value = "archiveCategoryPattern",
required = true) String archiveCategoryPattern,
@JsonProperty(value = "cleanChannelsAmount") int cleanChannelsAmount,
@JsonProperty(value = "minimumChannelsAmount", required = true) int minimumChannelsAmount) {
public DynamicVoiceChatConfig {
Objects.requireNonNull(dynamicChannelPatterns);
Objects.requireNonNull(archiveCategoryPattern);
}
}