JS Discord permiso bitfields

const bitfieldCalculator = require('discord-bitfield-calculator');

//the bitfield you get from some discord endpoint
const myBitfield = 523016588865;

//get the array returned and make it a varible
const myPerms = bitfieldCalculator.permissions(myBitfield);

//do as you wish with the array or permissions
console.log(myPerms);

if(myPerms.includes('BAN_MEMBERS')) {
    console.log("this bitfield contains the permission to ban members.");
} else {
    console.log("this bitfield doesn't contains the permission to ban members.");
}
Attractive Anteater