From b5f18453c4502f337daca3d86ffee9d9885f04f1 Mon Sep 17 00:00:00 2001 From: takejohn <105504345+takejohn@users.noreply.github.com> Date: Thu, 2 May 2024 22:22:52 +0900 Subject: [PATCH] =?UTF-8?q?config=E3=81=A7Images=E3=82=92=E5=88=87?= =?UTF-8?q?=E3=82=8C=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.json.example | 1 + core/internal/config.ts | 1 + packages/images/index.ts | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config.json.example b/config.json.example index 5382bb90..d5197f48 100755 --- a/config.json.example +++ b/config.json.example @@ -4,6 +4,7 @@ "features": { "admin": true, "cdn": true, + "images": true, "misc": true, "player": true, "templink": true, diff --git a/core/internal/config.ts b/core/internal/config.ts index b3ebea61..96f8a448 100644 --- a/core/internal/config.ts +++ b/core/internal/config.ts @@ -34,6 +34,7 @@ const configSchema = z .object({ admin: z.boolean().optional(), cdn: z.boolean().optional(), + images: z.boolean().optional(), misc: z.boolean().optional(), player: z.boolean().optional(), templink: z.boolean().optional(), diff --git a/packages/images/index.ts b/packages/images/index.ts index 44454450..08b1e5c1 100644 --- a/packages/images/index.ts +++ b/packages/images/index.ts @@ -1,10 +1,10 @@ -import { CommandManager, Feature } from 'core'; +import { CommandManager, Config, Feature } from 'core'; import { registerConfiguredFont } from './util/canvasUtils'; import { Client } from 'discord.js'; import path from 'path'; class ImagesFeature extends Feature { - enabled: boolean = true; + enabled: boolean = Config.features?.images ?? true; name: string = 'images';