|
1 | 1 | import { AkairoClient, CommandHandler, InhibitorHandler, ListenerHandler } from "discord-akairo"; |
2 | | -import { Collection } from "discord.js"; |
3 | 2 | import { join } from "path"; |
4 | 3 |
|
5 | 4 | interface BotConfig { |
6 | 5 | token: string; |
7 | | - channels: Collection<string, string>; |
8 | 6 | } |
9 | 7 |
|
10 | 8 | export default class BotClient extends AkairoClient { |
11 | 9 | public commandHandler: CommandHandler; |
12 | 10 | public listenerHandler: ListenerHandler; |
13 | | - public inhibitorHandler: InhibitorHandler; |
14 | 11 | public config: BotConfig; |
15 | 12 |
|
16 | 13 | constructor(config: BotConfig) { |
@@ -50,29 +47,19 @@ export default class BotClient extends AkairoClient { |
50 | 47 | this.listenerHandler = new ListenerHandler(this, { |
51 | 48 | directory: join(__dirname, "..", "events"), |
52 | 49 | }); |
53 | | - |
54 | | - /** |
55 | | - * Creates inhibitor handler |
56 | | - */ |
57 | | - this.inhibitorHandler = new InhibitorHandler(this, { |
58 | | - directory: join(__dirname, "..", "inhibitors"), |
59 | | - }); |
60 | 50 | } |
61 | 51 |
|
62 | 52 | private async initializeBot() { |
63 | 53 | //Attach handlers |
64 | 54 | this.listenerHandler.setEmitters({ |
65 | | - InhibitorHandler: this.inhibitorHandler, |
66 | 55 | commandHandler: this.commandHandler, |
67 | 56 | listenerHandler: this.listenerHandler, |
68 | 57 | }); |
69 | 58 |
|
70 | 59 | //Load handlers |
71 | 60 | this.commandHandler.useListenerHandler(this.listenerHandler); |
72 | | - this.commandHandler.useInhibitorHandler(this.inhibitorHandler); |
73 | 61 | this.listenerHandler.loadAll(); |
74 | 62 | this.commandHandler.loadAll(); |
75 | | - this.inhibitorHandler.loadAll(); |
76 | 63 | } |
77 | 64 |
|
78 | 65 | public async start(): Promise<string> { |
|
0 commit comments