Channel configuration validation + tags input

This commit is contained in:
Mehdi Benadel
2024-05-26 05:06:28 +02:00
parent 7c9e869e96
commit 35d9663559
11 changed files with 656 additions and 92 deletions

View File

@ -92,22 +92,9 @@ interface ChannelConfigurationOptions {
bot: {
enabled: boolean
nickname?: string
forbiddenWords: Array<{
entries: string[]
regexp?: boolean
applyToModerators?: boolean
label?: string
reason?: string
comments?: string
}>
quotes: Array<{
messages: string[]
delay: number
}>
commands: Array<{
command: string
message: string
}>
forbiddenWords: ChannelForbiddenWords[]
quotes: ChannelQuotes[]
commands: ChannelCommands[]
// TODO: bannedJIDs: string[]
}
slowMode: {
@ -115,6 +102,25 @@ interface ChannelConfigurationOptions {
}
}
interface ChannelForbiddenWords {
entries: string[]
regexp?: boolean
applyToModerators?: boolean
label?: string
reason?: string
comments?: string
}
interface ChannelQuotes {
messages: string[]
delay: number
}
interface ChannelCommands {
command: string
message: string
}
interface ChannelConfiguration {
channel: ChannelInfos
configuration: ChannelConfigurationOptions