mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
Convert disabledEvents Array to Object (#786)
* Convert disabledEvents Array to Object Increased performance * Commit to please Lord Gawdl3y * Nitpick with chopsticks
This commit is contained in:
committed by
Schuyler Cebulskie
parent
4653f88555
commit
3e2d6ccc48
@@ -84,7 +84,9 @@ class WebSocketPacketManager {
|
||||
|
||||
this.setSequence(packet.s);
|
||||
|
||||
if (this.ws.client.options.disabledEvents.includes(packet.t)) return false;
|
||||
if (this.ws.client.options.disabledEvents[packet.t] !== undefined) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.ws.status !== Constants.Status.READY) {
|
||||
if (BeforeReadyWhitelist.indexOf(packet.t) === -1) {
|
||||
|
||||
Reference in New Issue
Block a user