Skyler Turner | 66ac794 | 2022-02-24 01:59:22 +0000 | [diff] [blame] | 1 | import { HaikuClient } from 'jshaiku'; |
| 2 | import { Intents } from 'discord.js'; |
pineafan | dd1155e | 2022-02-26 22:06:12 +0000 | [diff] [blame] | 3 | import config from './config/main.json' assert {type: 'json'}; |
pineafan | 1dc1572 | 2022-03-14 21:27:34 +0000 | [diff] [blame] | 4 | import { Logger } from './utils/log.js'; |
Skyler Turner | 66ac794 | 2022-02-24 01:59:22 +0000 | [diff] [blame] | 5 | const client = new HaikuClient({ |
| 6 | intents: new Intents(32767).bitfield, // This is a way of specifying all intents w/o having to type them out |
| 7 | }, config); |
| 8 | |
| 9 | await client.registerCommandsIn("./commands"); |
pineafan | 1dc1572 | 2022-03-14 21:27:34 +0000 | [diff] [blame] | 10 | await client.registerEventsIn("./events"); |
| 11 | |
| 12 | client.logger = new Logger() |
| 13 | client.verify = {} |
pineafan | 377794f | 2022-04-18 19:01:01 +0100 | [diff] [blame] | 14 | client.roleMenu = {} |
Skyler Turner | 66ac794 | 2022-02-24 01:59:22 +0000 | [diff] [blame] | 15 | |
| 16 | await client.login(); |