blob: 306c5ee76ab051627ad11515056f4b212b022f61 [file] [log] [blame]
Skyler Turner66ac7942022-02-24 01:59:22 +00001import { HaikuClient } from 'jshaiku';
2import { Intents } from 'discord.js';
pineafandd1155e2022-02-26 22:06:12 +00003import config from './config/main.json' assert {type: 'json'};
pineafan1dc15722022-03-14 21:27:34 +00004import { Logger } from './utils/log.js';
pineafane625d782022-05-09 18:04:32 +01005import runServer from './api/index.js';
6import Memory from './utils/memory.js';
7
Skyler Turner66ac7942022-02-24 01:59:22 +00008const client = new HaikuClient({
9 intents: new Intents(32767).bitfield, // This is a way of specifying all intents w/o having to type them out
10}, config);
11
12await client.registerCommandsIn("./commands");
pineafan1dc15722022-03-14 21:27:34 +000013await client.registerEventsIn("./events");
pineafane625d782022-05-09 18:04:32 +010014client.on("ready", () => {
15 runServer(client);
16});
pineafan1dc15722022-03-14 21:27:34 +000017
18client.logger = new Logger()
19client.verify = {}
pineafan377794f2022-04-18 19:01:01 +010020client.roleMenu = {}
pineafane625d782022-05-09 18:04:32 +010021client.memory = new Memory()
Skyler Turner66ac7942022-02-24 01:59:22 +000022
23await client.login();