Skip to content

Commit 58cefb5

Browse files
committed
Remove inhibitor
1 parent 5ca7579 commit 58cefb5

File tree

3 files changed

+1
-37
lines changed

3 files changed

+1
-37
lines changed

src/bot.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,7 @@ import "dotenv/config";
44
import BotClient from "./client/client";
55

66
const client: BotClient = new BotClient({
7-
token: process.env.TOKEN,
8-
channels: new Collection([
9-
["bot-commands", "353544874034855936"],
10-
["discord-js", "713041505719287818"],
11-
//TODO add channels here, will be converted into an array, only using Map to add visualization on channel names
12-
]),
7+
token: process.env.TOKEN
138
});
149

1510
client.on("error", (error) => console.error(error));

src/client/client.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
import { AkairoClient, CommandHandler, InhibitorHandler, ListenerHandler } from "discord-akairo";
2-
import { Collection } from "discord.js";
32
import { join } from "path";
43

54
interface BotConfig {
65
token: string;
7-
channels: Collection<string, string>;
86
}
97

108
export default class BotClient extends AkairoClient {
119
public commandHandler: CommandHandler;
1210
public listenerHandler: ListenerHandler;
13-
public inhibitorHandler: InhibitorHandler;
1411
public config: BotConfig;
1512

1613
constructor(config: BotConfig) {
@@ -50,29 +47,19 @@ export default class BotClient extends AkairoClient {
5047
this.listenerHandler = new ListenerHandler(this, {
5148
directory: join(__dirname, "..", "events"),
5249
});
53-
54-
/**
55-
* Creates inhibitor handler
56-
*/
57-
this.inhibitorHandler = new InhibitorHandler(this, {
58-
directory: join(__dirname, "..", "inhibitors"),
59-
});
6050
}
6151

6252
private async initializeBot() {
6353
//Attach handlers
6454
this.listenerHandler.setEmitters({
65-
InhibitorHandler: this.inhibitorHandler,
6655
commandHandler: this.commandHandler,
6756
listenerHandler: this.listenerHandler,
6857
});
6958

7059
//Load handlers
7160
this.commandHandler.useListenerHandler(this.listenerHandler);
72-
this.commandHandler.useInhibitorHandler(this.inhibitorHandler);
7361
this.listenerHandler.loadAll();
7462
this.commandHandler.loadAll();
75-
this.inhibitorHandler.loadAll();
7663
}
7764

7865
public async start(): Promise<string> {

src/inhibitors/acceptedChannels.ts

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)