mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix(clientpresence): fix used opcodes (#7415)
This commit is contained in:
@@ -22,13 +22,13 @@ class ClientPresence extends Presence {
|
||||
const packet = this._parse(presence);
|
||||
this._patch(packet);
|
||||
if (typeof presence.shardId === 'undefined') {
|
||||
this.client.ws.broadcast({ op: GatewayOpcodes.StatusUpdate, d: packet });
|
||||
this.client.ws.broadcast({ op: GatewayOpcodes.PresenceUpdate, d: packet });
|
||||
} else if (Array.isArray(presence.shardId)) {
|
||||
for (const shardId of presence.shardId) {
|
||||
this.client.ws.shards.get(shardId).send({ op: GatewayOpcodes.StatusUpdate, d: packet });
|
||||
this.client.ws.shards.get(shardId).send({ op: GatewayOpcodes.PresenceUpdate, d: packet });
|
||||
}
|
||||
} else {
|
||||
this.client.ws.shards.get(presence.shardId).send({ op: GatewayOpcodes.StatusUpdate, d: packet });
|
||||
this.client.ws.shards.get(presence.shardId).send({ op: GatewayOpcodes.PresenceUpdate, d: packet });
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user