Revenge/src/index.ts

35 lines
997 B
TypeScript
Raw Normal View History

import { patchLogHook } from "@lib/debug";
import { patchCommands } from "@lib/commands";
import { initPlugins } from "@lib/plugins";
import { patchAssets } from "@ui/assets";
import { patchChatBackground } from "@lib/themes";
import initQuickInstall from "@ui/quickInstall";
import initSafeMode from "@ui/safeMode";
import initSettings from "@ui/settings";
2023-03-07 23:12:41 +00:00
import initFixes from "@lib/fixes";
import logger from "@lib/logger";
2023-03-07 23:12:41 +00:00
import windowObject from "@lib/windowObject";
2022-10-18 22:04:55 +00:00
export default async () => {
// Load everything in parallel
const unloads = await Promise.all([
patchLogHook(),
patchAssets(),
patchCommands(),
patchChatBackground(),
initFixes(),
initSafeMode(),
initSettings(),
initQuickInstall(),
]);
2022-10-18 22:04:55 +00:00
// Assign window object
window.vendetta = await windowObject(unloads);
// Once done, load plugins
unloads.push(await initPlugins());
// We good :)
logger.log("Vendetta is ready!");
}