ye.. and this is why the js command broke
This commit is contained in:
parent
9adf667da6
commit
fa3246b5da
|
@ -56,12 +56,12 @@ p.run = function (o) {
|
||||||
if (level === null || level === undefined) level = -1;
|
if (level === null || level === undefined) level = -1;
|
||||||
switch(o.cmd) {
|
switch(o.cmd) {
|
||||||
case ".adhs":
|
case ".adhs":
|
||||||
let s = [...o.args.toLowerCase()];
|
let fuckyoujs = [...o.args.toLowerCase()];
|
||||||
s = s.filter(c => /[a-z]/.test(c));
|
fuckyoujs = fuckyoujs.filter(c => /[a-z]/.test(c));
|
||||||
s = s.map((c, i) => {
|
fuckyoujs = fuckyoujs.map((c, i) => {
|
||||||
return alphanoise[((c.charCodeAt() -97) * (i+1) * 107) %26] /26;
|
return alphanoise[((c.charCodeAt() -97) * (i+1) * 107) %26] /26;
|
||||||
}).reduce((a,b)=>a+b) %1;
|
}).reduce((a,b)=>a+b) %1;
|
||||||
client.say(o.to, o.args + " has " + (s * 100).toFixed(2) + "% adhs");
|
client.say(o.to, o.args + " has " + (fuckyoujs * 100).toFixed(2) + "% adhs");
|
||||||
return true;
|
return true;
|
||||||
case ".level":
|
case ".level":
|
||||||
client.say(o.to, o.from + " dein level: " + userLevelNames[level]);
|
client.say(o.to, o.from + " dein level: " + userLevelNames[level]);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user