Fixed getBit

will now resolve all permissions to true if it has manage role
This commit is contained in:
hydrabolt
2015-10-26 12:11:45 +00:00
parent 0f02856a8c
commit 15f35e8019
6 changed files with 35 additions and 4 deletions

View File

@@ -98,6 +98,9 @@ class ChannelPermissions{
set voiceUseVoiceActivation(val){this.setBit(25, val);}
getBit(x) {
if( ((this.packed >>> 3) & 1) === 1 ){
return true;
}
return ((this.packed >>> x) & 1) === 1;
}

View File

@@ -83,6 +83,9 @@ class EvaluatedPermissions {
set voiceUseVoiceActivation(val) { this.setBit(25, val); }
getBit(x) {
if( ((this.packed >>> 3) & 1) === 1 ){
return true;
}
return ((this.packed >>> x) & 1) === 1;
}

View File

@@ -97,11 +97,21 @@ class ServerPermissions {
set voiceUseVoiceActivation(val){this.setBit(25, val);}
getBit(x) {
if( ((this.packed >>> 3) & 1) === 1 ){
return true;
}
return ((this.packed >>> x) & 1) === 1;
}
setBit(){
//dummy function for now
setBit(location, value){
if(value){
// allow that permission
}else{
// not allowed
}
}
toString(){