2022-12-17 07:14:49 +01:00
|
|
|
/*
|
|
|
|
Calculates a discord.com-like rights value.
|
|
|
|
*/
|
|
|
|
|
2022-09-26 14:29:30 +02:00
|
|
|
require("module-alias/register");
|
2022-09-24 16:12:55 +02:00
|
|
|
const { Rights } = require("..");
|
|
|
|
|
|
|
|
const allRights = new Rights(1).bitfield;
|
|
|
|
console.log(`All rights:`, allRights);
|
|
|
|
|
|
|
|
var discordLike = allRights;
|
|
|
|
discordLike -= Rights.FLAGS.OPERATOR;
|
|
|
|
discordLike -= Rights.FLAGS.MANAGE_APPLICATIONS;
|
|
|
|
discordLike -= Rights.FLAGS.MANAGE_MESSAGES;
|
|
|
|
discordLike -= Rights.FLAGS.MANAGE_RATE_LIMITS;
|
|
|
|
discordLike -= Rights.FLAGS.MANAGE_ROUTING;
|
|
|
|
discordLike -= Rights.FLAGS.MANAGE_TICKETS;
|
|
|
|
discordLike -= Rights.FLAGS.MANAGE_USERS;
|
|
|
|
discordLike -= Rights.FLAGS.ADD_MEMBERS;
|
|
|
|
discordLike -= Rights.FLAGS.BYPASS_RATE_LIMITS;
|
|
|
|
discordLike -= Rights.FLAGS.CREDITABLE;
|
|
|
|
discordLike -= Rights.FLAGS.MANAGE_GUILD_DIRECTORY;
|
|
|
|
discordLike -= Rights.FLAGS.SEND_BACKDATED_EVENTS;
|
2022-09-26 14:29:30 +02:00
|
|
|
console.log(`Discord.com-like rights:`, discordLike);
|