feat: migrate from github

This commit is contained in:
2024-05-12 01:52:39 -07:00
commit 7437deab71
118 changed files with 10375 additions and 0 deletions

24
src/index.ts Normal file
View File

@ -0,0 +1,24 @@
import { Client } from "discord.js";
import { IntentOptions } from "./config/IntentOptions";
import { connectDatabase } from "./database/connectDatabase";
import { handleEvents } from "./events/_handleEvents";
import { ExtendedClient } from "./interfaces/ExtendedClient";
import { validateEnv } from "./modules/validateEnv";
import { serve } from "./server/serve";
import { loadCommands } from "./utils/loadCommands";
import { loadContexts } from "./utils/loadContexts";
(async () => {
const bot = new Client({ intents: IntentOptions }) as ExtendedClient;
bot.env = validateEnv();
bot.configs = {};
bot.commands = await loadCommands(bot);
bot.contexts = await loadContexts(bot);
await connectDatabase(bot);
handleEvents(bot);
serve(bot);
await bot.login(bot.env.token);
})();