From f44f5d7ac2d24ff836c2e1d4b2fa58da04b13052 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Sun, 25 Sep 2022 18:24:21 +1000 Subject: Refactor to mono-repo + upgrade packages --- src-slowcord/bot/src/index.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src-slowcord/bot/src/index.ts (limited to 'src-slowcord/bot/src/index.ts') diff --git a/src-slowcord/bot/src/index.ts b/src-slowcord/bot/src/index.ts new file mode 100644 index 00000000..ae69111b --- /dev/null +++ b/src-slowcord/bot/src/index.ts @@ -0,0 +1,24 @@ +import "dotenv/config"; +import Fosscord from "fosscord-gopnik"; +import Bot from "./Bot.js"; // huh? +import { initDatabase } from "@fosscord/util"; + +const client = new Fosscord.Client({ + intents: ["GUILD_MESSAGES"], + + http: { + api: process.env.ENDPOINT_API, + cdn: process.env.ENDPOINT_CDN, + invite: process.env.ENDPOINT_INV, + }, +}); + +const bot = new Bot(client); + +client.on("ready", bot.onReady); +client.on("messageCreate", bot.onMessageCreate); + +(async () => { + await initDatabase(); + await client.login(process.env.TOKEN); +})(); \ No newline at end of file -- cgit 1.5.1