blob: fa97313fd56584d995ce0be5bcf4d45efa2b155c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
import "dotenv/config";
import Fosscord from "fosscord-gopnik";
import Bot from "./Bot.js"; // huh?
import { initDatabase } from "fosscord-server/src/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);
})();
|