summary refs log tree commit diff
path: root/scripts/rights.js
diff options
context:
space:
mode:
authorCatalan Lover <48515417+FSG-Cat@users.noreply.github.com>2022-08-23 23:50:01 +0200
committerGitHub <noreply@github.com>2022-08-23 23:50:01 +0200
commitd63451b3fe6c0c6ab175adec82361834bb3633f5 (patch)
treeb738ee25bf9819300e1802ba9a8e2813e9dc2588 /scripts/rights.js
parentMerge pull request #1 from FSG-Cat/FSG-Cat-patch-1 (diff)
parentCheck Captcha (diff)
downloadserver-d63451b3fe6c0c6ab175adec82361834bb3633f5.tar.xz
Merge branch 'fosscord:staging' into Bug-Report-Template
Diffstat (limited to 'scripts/rights.js')
-rw-r--r--scripts/rights.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/scripts/rights.js b/scripts/rights.js
index 20fd139c..5ae576ef 100644
--- a/scripts/rights.js
+++ b/scripts/rights.js
@@ -6,20 +6,20 @@ const { argv, stdout, exit } = require("process");
 
 const { execIn, getLines, parts } = require("./utils");
 
-let lines = fs.readFileSync(path.join(__dirname, "..", "src", "util", "util","Rights.ts")).toString()
+let lines = fs.readFileSync(path.join(__dirname, "..", "src", "util", "util", "Rights.ts")).toString();
 let lines2 = lines.split("\n");
-let lines3 = lines2.filter(y=>y.includes(": BitFlag("));
-let lines4 = lines3.map(x=>x.split("//")[0].trim())
+let lines3 = lines2.filter((y) => y.includes(": BitFlag("));
+let lines4 = lines3.map((x) => x.split("//")[0].trim());
 
 function BitFlag(int) {
-    return 1n << eval(`${int}n`);
+	return 1n << BigInt(int);
 }
 
-let rights = []
+let rights = [];
 let maxRights = 0n;
-lines4.forEach(x=>{
-    maxRights += eval(`rights.${x.replace(':'," = ").replace(",",";")}`)
-})
+lines4.forEach((x) => {
+	maxRights += eval(`rights.${x.replace(":", " = ").replace(",", ";")}`);
+});
 //max rights...
 console.log(`Maximum rights: ${maxRights}`);
 //discord rights...
@@ -31,4 +31,4 @@ discordRights -= rights.BYPASS_RATE_LIMITS;
 discordRights -= rights.ADD_MEMBERS;
 discordRights -= rights.MANAGE_RATE_LIMITS;
 discordRights -= rights.OPERATOR;
-console.log(`Discord-like rights: ${discordRights}`);
\ No newline at end of file
+console.log(`Discord-like rights: ${discordRights}`);