fix: rename roles to attributes to avoid confusion

This commit is contained in:
hippoz 2021-09-15 17:11:53 +03:00
parent 85c3813dd6
commit 8b2dfa92d9
Signed by: hippoz
GPG key ID: 7C52899193467641

View file

@ -60,7 +60,7 @@ class GatewayConnection {
} }
} }
GatewayConnection.prototype.connect = function(token, roles=["PRESENCE_UPDATES"]) { GatewayConnection.prototype.connect = function(token, attributes=["PRESENCE_UPDATES"]) {
if (token) this.token = token; if (token) this.token = token;
if (this.token) token = this.token; if (this.token) token = this.token;
@ -90,7 +90,7 @@ GatewayConnection.prototype.connect = function(token, roles=["PRESENCE_UPDATES"]
logGateway("Got HELLO", packet.data); logGateway("Got HELLO", packet.data);
this.helloData = packet.data; this.helloData = packet.data;
logGateway("Sending YOO"); logGateway("Sending YOO");
this.ws.send(this.packet("YOO", { token, roles })); this.ws.send(this.packet("YOO", { token, attributes }));
break; break;
} }
case "EVENT_CHANNEL_MEMBERS": { case "EVENT_CHANNEL_MEMBERS": {