mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 05:52:05 +00:00
Emit packet handling errors to the error event and not the debug event
This commit is contained in:
parent
c3be798663
commit
892ba67d71
1 changed files with 5 additions and 2 deletions
|
|
@ -99,8 +99,11 @@ class WebSocketPacketManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!queue && this.queue.length > 0) this.handleQueue();
|
if (!queue && this.queue.length > 0) this.handleQueue();
|
||||||
|
try {
|
||||||
if (this.handlers[packet.t]) return this.handlers[packet.t].handle(packet);
|
if (this.handlers[packet.t]) return this.handlers[packet.t].handle(packet);
|
||||||
|
} catch (error) {
|
||||||
|
this.client.emit(Constants.Events.ERROR, error);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue