add support for roles system
This commit is contained in:
parent
812f38dafe
commit
85c3813dd6
1 changed files with 2 additions and 2 deletions
|
@ -60,7 +60,7 @@ class GatewayConnection {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GatewayConnection.prototype.connect = function(token) {
|
GatewayConnection.prototype.connect = function(token, roles=["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) {
|
||||||
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 }));
|
this.ws.send(this.packet("YOO", { token, roles }));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "EVENT_CHANNEL_MEMBERS": {
|
case "EVENT_CHANNEL_MEMBERS": {
|
||||||
|
|
Loading…
Reference in a new issue