mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
Add stricter/better ESLint config (#589)
* Add stricter/better ESLint config * Remove more unnecessary @returns
This commit is contained in:
committed by
Amish Shah
parent
2682c07bd8
commit
68acf37fd4
@@ -51,16 +51,18 @@ class VoiceConnectionWebSocket extends EventEmitter {
|
||||
});
|
||||
}
|
||||
|
||||
_onClose(e) {
|
||||
_onClose(err) {
|
||||
if (!this.opened && this.attempts >= 0) {
|
||||
return this.setupWS();
|
||||
this.setupWS();
|
||||
return;
|
||||
}
|
||||
this.emit('close', e);
|
||||
this.emit('close', err);
|
||||
}
|
||||
|
||||
_onError(e) {
|
||||
if (!this.opened && this.attempts >= 0) {
|
||||
return this.setupWS();
|
||||
this.setupWS();
|
||||
return;
|
||||
}
|
||||
this.emit('error', e);
|
||||
}
|
||||
@@ -83,7 +85,8 @@ class VoiceConnectionWebSocket extends EventEmitter {
|
||||
try {
|
||||
packet = JSON.parse(event.data);
|
||||
} catch (error) {
|
||||
return this._onError(error);
|
||||
this._onError(error);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (packet.op) {
|
||||
|
||||
Reference in New Issue
Block a user