galactic-bot/middleware/client/DiscordClient.js

41 lines
781 B
JavaScript
Raw Normal View History

2020-04-08 18:08:46 +02:00
const { Client } = require('discord.js');
const EventHooker = require('./EventHooker.js');
const Dispatcher = require('./Dispatcher.js')
const Resolver = require('./Resolver.js');
const { Guild, User, Message } = require('../../structure/extensions/');
class DiscordClient extends Client {
constructor(manager, options) {
this.manager = manager;
this.registry = this.manager.registry;
this.eventHooker = new EventHooker(this);
this.dispatcher = new Dispatcher(this);
this.resolver = new Resolver(this);
this._options = options;
this._built = false;
}
async build() {
this._built = true;
}
}
module.exports = DiscordClient;
const client = new DiscordClient();
client.build();