mirror of
https://github.com/danbulant/discord.js
synced 2026-06-06 08:11:50 +00:00
Added permission fields missing in server permissions
This commit is contained in:
parent
e9afa94c32
commit
685d08ffa5
2 changed files with 19 additions and 0 deletions
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue