1.0.2 • Published 3 years ago

discord-permissions v1.0.2

Weekly downloads
23
License
ISC
Repository
-
Last release
3 years ago

Installation

npm: npm i discord-permissions

About

discord-permissions is a tool for calculating permissions bitfield, getting their bitfield value, and resolving them to a string.

Usage

const perms = require("discord-permissions");

console.log(perms.resolvePermission("     manage   roles ")); // "MANAGE_ROLES"
console.log(perms.getBitfield([" manage roles ", "change NICKNaMe"])); // 335544320
console.log(perms.generateInvite("12345678912345678", [" manage guild ", "EMBED_LINKS"])); // "https://discordapp.com/oauth2/authorize?client_id=12345678912345678&scope=bot&permissions=16416"