@evolvejs/core
Version:
An advanced Discord API wrapper with TS and JS support
21 lines (20 loc) • 589 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.BaseEvent = void 0;
class BaseEvent {
constructor(_shard, _client) {
this._shard = _shard;
this._client = _client;
}
get shard() {
const shardConnection = this._client.sharder.connections.get(this._shard);
if (!shardConnection) {
throw this.client.transformer.error("Internal Error (Shard Websocket Not Found)");
}
return shardConnection;
}
get client() {
return this._client;
}
}
exports.BaseEvent = BaseEvent;