GoonCord/src/core/plugins/index.ts

28 lines
769 B
TypeScript
Raw Normal View History

import { PluginInstanceInternal } from "@lib/addons/plugins/types";
2024-02-28 17:59:47 +08:00
2024-07-30 00:18:01 +08:00
interface CorePlugin {
default: PluginInstanceInternal;
preenabled: boolean;
2024-07-30 00:18:01 +08:00
}
// Called from @lib/plugins
export const getCorePlugins = (): Record<string, CorePlugin> => ({
"bunny.quickinstall": { ...require("./quickinstall"), preenabled: true },
"bunny.badges": require("./badges"),
"bunny.notrack": require("./notrack"),
"bunny.messagefix": require("./messagefix"),
"bunny.fixembed": require("./fixembed"),
2025-11-30 18:25:32 +01:00
"bunny.enhancements": require("./shiggyenhancements")
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
}