From 72627a7058c837a5311f7db5f73ab0d5831d6a12 Mon Sep 17 00:00:00 2001 From: DJj123dj <80536295+DJj123dj@users.noreply.github.com> Date: Wed, 11 Jun 2025 21:10:29 +0200 Subject: [PATCH] Added new config checker utility function createTemporaryCheckerEnvironment() is able to help you with using `ODCheckerStructure` validators without officially registering them in opendiscord.checkers. --- src/core/api/modules/checker.ts | 4 ++++ src/core/startup/pluginLauncher.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/api/modules/checker.ts b/src/core/api/modules/checker.ts index 3e70b11..8b6f8d7 100644 --- a/src/core/api/modules/checker.ts +++ b/src/core/api/modules/checker.ts @@ -82,6 +82,10 @@ export class ODCheckerManager extends ODManager { messages:final } } + /**Create temporary and unlisted `ODConfig`, `ODChecker` & `ODCheckerStorage` classes. This will help you use a `ODCheckerStructure` validator without officially registering it in `opendiscord.checkers`. */ + createTemporaryCheckerEnvironment(){ + return new ODChecker("opendiscord:temporary-environment",new ODCheckerStorage(),0,new ODConfig("opendiscord:temporary-environment",{}),new ODCheckerStructure("opendiscord:temporary-environment",{})) + } } /**## ODCheckerStorage `class` diff --git a/src/core/startup/pluginLauncher.ts b/src/core/startup/pluginLauncher.ts index 1d3401c..f8e219f 100644 --- a/src/core/startup/pluginLauncher.ts +++ b/src/core/startup/pluginLauncher.ts @@ -82,7 +82,7 @@ export const loadAllPlugins = async () => { } }) - //sorted plugins (based on priority) + //sorted plugins (sorted on priority. All plugins are loaded & enabled) const sortedPlugins = opendiscord.plugins.getAll().sort((a,b) => { return (b.priority - a.priority) })