feat(bots/discord): update config

This commit is contained in:
PalmDevs
2024-06-24 01:14:56 +07:00
parent 4aa138a9af
commit 197d2acea8
2 changed files with 37 additions and 0 deletions

View File

@@ -3,6 +3,16 @@ import type { APIEmbed } from 'discord.js'
export type Config = {
owners: string[]
guilds: string[]
moderation?: {
log?: {
channel: string
thread?: string
}
}
rolePresets?: {
checkExpiredEvery: number
guilds: Record<string, Record<string, RolePresetData>>
}
messageScan?: {
allowedAttachmentMimeTypes: string[]
filter: {
@@ -29,6 +39,11 @@ export type Config = {
}
}
export type RolePresetData = {
give: string[]
take: string[]
}
export type ConfigMessageScanResponse = {
triggers: {
text?: Array<RegExp | ConfigMessageScanResponseLabelConfig>

View File

@@ -3,6 +3,28 @@ import type { Config } from './config.schema'
export default {
owners: ['USER_ID_HERE'],
guilds: ['GUILD_ID_HERE'],
moderation: {
log: {
channel: 'CHANNEL_ID_HERE',
// Optional
thread: 'THREAD_ID_HERE',
},
},
rolePresets: {
guilds: {
GUILD_ID_HERE: {
preset: {
give: ['ROLE_ID_HERE'],
take: ['ROLE_ID_HERE'],
},
anotherPreset: {
give: ['ROLE_ID_HERE'],
take: ['ROLE_ID_HERE'],
},
},
},
checkExpiredEvery: 3600,
},
messageScan: {
filter: {
channels: ['CHANNEL_ID_HERE'],