mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 02:53:31 +01:00
Added permission fields missing in server permissions
This commit is contained in:
@@ -14,6 +14,10 @@ var ServerPermissions = (function () {
|
|||||||
return (self.packed >>> x & 1) === 1;
|
return (self.packed >>> x & 1) === 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.managed = data.managed;
|
||||||
|
this.position = data.position || 1;
|
||||||
|
this.hoist = data.hoist;
|
||||||
|
this.color = data.color;
|
||||||
this.packed = data.permissions;
|
this.packed = data.permissions;
|
||||||
this.name = data.name;
|
this.name = data.name;
|
||||||
this.id = data.id;
|
this.id = data.id;
|
||||||
@@ -64,6 +68,12 @@ var ServerPermissions = (function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
_createClass(ServerPermissions, [{
|
_createClass(ServerPermissions, [{
|
||||||
|
key: "colour",
|
||||||
|
get: function get() {
|
||||||
|
// screw the american spelling
|
||||||
|
return this.color;
|
||||||
|
}
|
||||||
|
}, {
|
||||||
key: "createInstantInvite",
|
key: "createInstantInvite",
|
||||||
get: function get() {
|
get: function get() {
|
||||||
return this.getBit(0);
|
return this.getBit(0);
|
||||||
|
|||||||
@@ -8,12 +8,21 @@ class ServerPermissions {
|
|||||||
return ((self.packed >>> x) & 1) === 1;
|
return ((self.packed >>> x) & 1) === 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.managed = data.managed;
|
||||||
|
this.position = data.position || 1;
|
||||||
|
this.hoist = data.hoist;
|
||||||
|
this.color = data.color;
|
||||||
this.packed = data.permissions;
|
this.packed = data.permissions;
|
||||||
this.name = data.name;
|
this.name = data.name;
|
||||||
this.id = data.id;
|
this.id = data.id;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get colour(){
|
||||||
|
// screw the american spelling
|
||||||
|
return this.color;
|
||||||
|
}
|
||||||
|
|
||||||
serialise() {
|
serialise() {
|
||||||
return {
|
return {
|
||||||
createInstantInvite : this.createInstantInvite,
|
createInstantInvite : this.createInstantInvite,
|
||||||
|
|||||||
Reference in New Issue
Block a user