From 197d2acea89c38e43858d52736508d449152e804 Mon Sep 17 00:00:00 2001 From: PalmDevs Date: Mon, 24 Jun 2024 01:14:56 +0700 Subject: [PATCH] feat(bots/discord): update config --- bots/discord/config.schema.ts | 15 +++++++++++++++ bots/discord/config.ts | 22 ++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/bots/discord/config.schema.ts b/bots/discord/config.schema.ts index d94eb4f..2aec333 100644 --- a/bots/discord/config.schema.ts +++ b/bots/discord/config.schema.ts @@ -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> + } messageScan?: { allowedAttachmentMimeTypes: string[] filter: { @@ -29,6 +39,11 @@ export type Config = { } } +export type RolePresetData = { + give: string[] + take: string[] +} + export type ConfigMessageScanResponse = { triggers: { text?: Array diff --git a/bots/discord/config.ts b/bots/discord/config.ts index 9749e31..f49fc6c 100644 --- a/bots/discord/config.ts +++ b/bots/discord/config.ts @@ -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'],