mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 20:13:30 +01:00
added getBit to channelpermissions
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
class ChannelPermissions{
|
class ChannelPermissions{
|
||||||
constructor(data){
|
constructor(data){
|
||||||
|
|
||||||
|
function getBit(x) {
|
||||||
|
return ((this.packed >>> x) & 1) === 1;
|
||||||
|
}
|
||||||
|
|
||||||
this.type = data.type; //either member or role
|
this.type = data.type; //either member or role
|
||||||
|
|
||||||
this.id = data.id;
|
this.id = data.id;
|
||||||
@@ -10,6 +14,10 @@ class ChannelPermissions{
|
|||||||
this.allow = data.allow;
|
this.allow = data.allow;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getBit(x) {
|
||||||
|
return ((this.packed >>> x) & 1) === 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = ChannelPermissions;
|
module.exports = ChannelPermissions;
|
||||||
Reference in New Issue
Block a user