GoonCord/src/core/plugins/index.ts

21 lines
517 B
TypeScript
Raw Normal View History

2024-07-30 00:18:01 +08:00
import { PluginInstanceInternal } from "@lib/plugins/types";
2024-02-28 17:59:47 +08:00
2024-07-30 00:18:01 +08:00
interface CorePlugin {
default: PluginInstanceInternal;
preenabled: boolean;
}
// Called from @lib/plugins
export const getCorePlugins = (): Record<string, CorePlugin> => ({
2024-07-30 21:04:41 +08:00
"bunny.quickinstall": require("./quickinstall")
2024-07-30 00:18:01 +08:00
});
2024-02-28 17:59:47 +08:00
2024-07-30 00:18:01 +08:00
/**
* @internal
*/
export function defineCorePlugin(instance: PluginInstanceInternal): PluginInstanceInternal {
// @ts-expect-error
instance[Symbol.for("bunny.core.plugin")] = true;
return instance;
2024-03-06 01:57:59 +08:00
}