-
-
Notifications
You must be signed in to change notification settings - Fork 108
Expand file tree
/
Copy pathDynamicVoiceChatConfig.java
More file actions
34 lines (30 loc) · 1.35 KB
/
DynamicVoiceChatConfig.java
File metadata and controls
34 lines (30 loc) · 1.35 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
31
32
33
34
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) {
/**
* Constructs an instance of {@code DynamicVoiceChatConfig} and throws if
* {@code dynamicChannelPatterns} or @{code archiveCategoryPattern} is null.
*/
public DynamicVoiceChatConfig {
Objects.requireNonNull(dynamicChannelPatterns);
Objects.requireNonNull(archiveCategoryPattern);
}
}