refactor(PresenceManager): have Presence extend Base and simplify add (#6056)

* refactor(PresenceManager): have Presence extend Base and simplify add

* style(Presence): add empty line after super call

Co-authored-by: Noel <buechler.noel@outlook.com>

Co-authored-by: Noel <buechler.noel@outlook.com>
This commit is contained in:
SpaceEEC
2021-07-05 20:53:15 +02:00
committed by GitHub
parent afbd5db404
commit ded93feb57
4 changed files with 10 additions and 15 deletions

View File

@@ -15,7 +15,7 @@ class ClientPresence extends Presence {
set(presence) {
const packet = this._parse(presence);
this.patch(packet);
this._patch(packet);
if (typeof presence.shardId === 'undefined') {
this.client.ws.broadcast({ op: OPCodes.STATUS_UPDATE, d: packet });
} else if (Array.isArray(presence.shardId)) {