Refactor loadV2Plugin to use database plugins instead of passed plugins
This commit is contained in:
@@ -166,8 +166,9 @@ export async function loadV2Plugin(plugins:RisuPlugin[]){
|
|||||||
risuFetch: globalFetch,
|
risuFetch: globalFetch,
|
||||||
nativeFetch: fetchNative,
|
nativeFetch: fetchNative,
|
||||||
getArg: (arg:string) => {
|
getArg: (arg:string) => {
|
||||||
|
const db = getDatabase()
|
||||||
const [name, realArg] = arg.split('::')
|
const [name, realArg] = arg.split('::')
|
||||||
for(const plug of plugins){
|
for(const plug of db.plugins){
|
||||||
if(plug.name === name){
|
if(plug.name === name){
|
||||||
return plug.realArg[realArg]
|
return plug.realArg[realArg]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user