From b612d28f1b2f1aad1897b7362a7f715293a9193a Mon Sep 17 00:00:00 2001 From: Kwaroran Date: Wed, 25 Dec 2024 00:19:03 +0900 Subject: [PATCH] Refactor loadV2Plugin to use database plugins instead of passed plugins --- src/ts/plugins/plugins.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ts/plugins/plugins.ts b/src/ts/plugins/plugins.ts index f65e9048..ae0eaa6a 100644 --- a/src/ts/plugins/plugins.ts +++ b/src/ts/plugins/plugins.ts @@ -166,8 +166,9 @@ export async function loadV2Plugin(plugins:RisuPlugin[]){ risuFetch: globalFetch, nativeFetch: fetchNative, getArg: (arg:string) => { + const db = getDatabase() const [name, realArg] = arg.split('::') - for(const plug of plugins){ + for(const plug of db.plugins){ if(plug.name === name){ return plug.realArg[realArg] }