From b13dfb2ece84253d14cc9121477110b7585088e6 Mon Sep 17 00:00:00 2001 From: MythEclipse Date: Wed, 13 May 2026 19:34:14 +0700 Subject: [PATCH] config: add moderation watcher configuration variables - Add MONITOR_GUILD_ID for target server monitoring - Add PICSER_UPLOAD_URL for attachment upload endpoint - Add attachment upload timeout and size limit settings - Add retry attempts configuration for upload failures --- .env.example | 7 ++++++- src/config.ts | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index f28a383..8d0269c 100644 --- a/.env.example +++ b/.env.example @@ -29,5 +29,10 @@ RECONNECT_TIMEOUT_MS=5000 LOG_LEVEL=info NODE_ENV=development - +# Moderation Configuration +MONITOR_GUILD_ID=your_guild_id_here +PICSER_UPLOAD_URL=https://picser.asepharyana.tech/api/upload +ATTACHMENT_UPLOAD_TIMEOUT_MS=30000 +ATTACHMENT_MAX_SIZE_MB=100 +ATTACHMENT_RETRY_ATTEMPTS=3 diff --git a/src/config.ts b/src/config.ts index bad524c..f214f6c 100644 --- a/src/config.ts +++ b/src/config.ts @@ -27,6 +27,11 @@ const configSchema = z.object({ NODE_ENV: z .enum(["development", "production", "test"]) .default("development"), + MONITOR_GUILD_ID: z.string().min(1).optional(), + PICSER_UPLOAD_URL: z.string().url().default("https://picser.asepharyana.tech/api/upload"), + ATTACHMENT_UPLOAD_TIMEOUT_MS: z.coerce.number().positive().default(30000), + ATTACHMENT_MAX_SIZE_MB: z.coerce.number().positive().default(100), + ATTACHMENT_RETRY_ATTEMPTS: z.coerce.number().positive().default(3), }); export type AppConfig = z.infer;