mirror of
https://github.com/danbulant/discord.js
synced 2026-05-24 20:42:27 +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 (this.handlers[packet.t]) return this.handlers[packet.t].handle(packet);
|
||||
try {
|
||||
if (this.handlers[packet.t]) return this.handlers[packet.t].handle(packet);
|
||||
} catch (error) {
|
||||
this.client.emit(Constants.Events.ERROR, error);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue