mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 11:33:30 +01:00
Added setting permissions
You should just do: permissionObject.manageRoles = true; for example rather than messing with setBit.
This commit is contained in:
@@ -104,8 +104,17 @@ class ChannelPermissions{
|
||||
return ((this.packed >>> x) & 1) === 1;
|
||||
}
|
||||
|
||||
setBit() {
|
||||
setBit(location, value){
|
||||
|
||||
if(value){
|
||||
// allow that permission
|
||||
this.packed |= (1 << location);
|
||||
|
||||
}else{
|
||||
// not allowed
|
||||
this.packed &= (1 << location);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user