mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
Emit packet handling errors to the error event and not the debug event
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user