mirror of
https://github.com/danbulant/discord.js
synced 2026-05-25 04:52:22 +00:00
added getBit to channelpermissions
This commit is contained in:
parent
2ededd61dd
commit
cd91a384bd
1 changed files with 8 additions and 0 deletions
|
|
@ -1,6 +1,10 @@
|
|||
class ChannelPermissions{
|
||||
constructor(data){
|
||||
|
||||
function getBit(x) {
|
||||
return ((this.packed >>> x) & 1) === 1;
|
||||
}
|
||||
|
||||
this.type = data.type; //either member or role
|
||||
|
||||
this.id = data.id;
|
||||
|
|
@ -10,6 +14,10 @@ class ChannelPermissions{
|
|||
this.allow = data.allow;
|
||||
|
||||
}
|
||||
|
||||
getBit(x) {
|
||||
return ((this.packed >>> x) & 1) === 1;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ChannelPermissions;
|
||||
Loading…
Reference in a new issue