summary refs log tree commit diff
path: root/src-slowcord/bot/src/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src-slowcord/bot/src/index.ts')
-rw-r--r--src-slowcord/bot/src/index.ts24
1 files changed, 24 insertions, 0 deletions
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