sheweny
Version:
The powerful framework for create discord bots
53 lines • 1.6 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.BaseManager = void 0;
const events_1 = require("events");
class BaseManager extends events_1.EventEmitter {
/**
* Constructor of BaseManager class (extends EventEmitter)
* @param {ShewenyClient} [client]
* @param {BaseManagerOptions} [options]
*/
constructor(client, options) {
super();
/**
* Directory to load
* @type {boolean}
*/
Object.defineProperty(this, "asyncRead", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
/**
* Client framework
* @type {ShewenyClient}
*/
Object.defineProperty(this, "client", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
/**
* Directory to load
* @type {string}
*/
Object.defineProperty(this, "directory", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
if (!client)
throw new TypeError('Client must be provided.');
if (!options || (options && !options?.directory))
throw new TypeError('Directory must be provided.');
this.asyncRead = options.asyncRead ?? false;
this.client = client;
this.directory = options.directory;
}
}
exports.BaseManager = BaseManager;
//# sourceMappingURL=BaseManager.js.map