1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-25 11:43:07 +01:00
server/scripts/rights.js
TheArcaneBrony 32b93c857f
var -> let
Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com>
2023-01-14 13:33:24 +01:00

25 lines
828 B
JavaScript

/*
Calculates a discord.com-like rights value.
*/
require("module-alias/register");
const { Rights } = require("..");
const allRights = new Rights(1).bitfield;
console.log(`All rights:`, allRights);
let 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;
console.log(`Discord.com-like rights:`, discordLike);