2019-01-02 10:21:21 +01:00
|
|
|
const { AkairoClient, CommandHandler, InhibitorHandler, ListenerHandler } = require('discord-akairo');
|
|
|
|
const { token, prefix, ownerID } = require('./config.json');
|
2018-09-08 23:34:08 +02:00
|
|
|
|
2019-01-02 10:21:21 +01:00
|
|
|
|
|
|
|
class hahaYesClient extends AkairoClient {
|
|
|
|
constructor() {
|
|
|
|
super({
|
|
|
|
ownerID: ownerID,
|
|
|
|
}, {
|
|
|
|
disableEveryone: true
|
|
|
|
});
|
|
|
|
|
|
|
|
this.commandHandler = new CommandHandler(this, {
|
|
|
|
directory: './commands/',
|
|
|
|
prefix: prefix,
|
|
|
|
commandUtil: true,
|
2019-01-02 21:46:45 +01:00
|
|
|
commandUtilLifetime: 60000,
|
2019-01-02 10:21:21 +01:00
|
|
|
allowMention: true,
|
|
|
|
handleEdits: true,
|
|
|
|
});
|
|
|
|
|
|
|
|
this.inhibitorHandler = new InhibitorHandler(this, {
|
2019-01-10 08:58:33 +01:00
|
|
|
directory: './event/inhibitors/',
|
2019-01-02 10:21:21 +01:00
|
|
|
emitters: {
|
|
|
|
process
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
this.listenerHandler = new ListenerHandler(this, {
|
2019-01-10 08:58:33 +01:00
|
|
|
directory: './event/listeners/'
|
2019-01-02 10:21:21 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
this.listenerHandler.setEmitters({
|
|
|
|
commandHandler: this.commandHandler,
|
|
|
|
inhibitorHandler: this.inhibitorHandler,
|
|
|
|
listenerHandler: this.listenerHandler
|
|
|
|
});
|
|
|
|
|
|
|
|
this.commandHandler.useInhibitorHandler(this.inhibitorHandler);
|
|
|
|
this.commandHandler.useListenerHandler(this.listenerHandler);
|
|
|
|
|
|
|
|
this.listenerHandler.loadAll();
|
|
|
|
this.inhibitorHandler.loadAll();
|
|
|
|
this.commandHandler.loadAll();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const client = new hahaYesClient();
|
2018-12-30 01:20:24 +01:00
|
|
|
client.login(token);
|