Added new config checker utility function
createTemporaryCheckerEnvironment() is able to help you with using `ODCheckerStructure` validators without officially registering them in opendiscord.checkers.
This commit is contained in:
@@ -82,6 +82,10 @@ export class ODCheckerManager extends ODManager<ODChecker> {
|
|||||||
messages:final
|
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`
|
/**## ODCheckerStorage `class`
|
||||||
|
|||||||
@@ -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) => {
|
const sortedPlugins = opendiscord.plugins.getAll().sort((a,b) => {
|
||||||
return (b.priority - a.priority)
|
return (b.priority - a.priority)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user