djs-perm-handler
v1.0.9
Published
A permission handler for Discord.JS v12!
Downloads
3
Readme
Permissions made easy!
A simple (yet kinda over-complicated) permission handler for Discord.JS v12!
Setup:
npm i djs-perm-handler
Usage:
const { Perms, parsePerm } = require("djs-perm-handler"); // example for checking if message author has permission "MANAGE_MESSAGES". if (!message.member.hasPermission(Perms.MANAGE_MESSAGES)) return; // 0x0000002000 is used here. // or we can parse the number to the string version of it's owner! if (!message.member.hasPermission(parsePerm(Perms.MANAGE_MESSAGES))) return; // MANAGE_MESSAGES is used here.