mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 02:23: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 (!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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user