summary refs log tree commit diff
path: root/src-slowcord/bot/src/index.ts
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-09-25 18:24:21 +1000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-09-25 23:35:18 +1000
commitf44f5d7ac2d24ff836c2e1d4b2fa58da04b13052 (patch)
treea6655c41bb3db79c30fd876b06ee60fe9cf70c9b /src-slowcord/bot/src/index.ts
parentAllow edited_timestamp to passthrough in handleMessage (diff)
downloadserver-f44f5d7ac2d24ff836c2e1d4b2fa58da04b13052.tar.xz
Refactor to mono-repo + upgrade packages
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