Skip to content

Commit bef9f68

Browse files
authored
Add files via upload
1 parent 3b1e634 commit bef9f68

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

Diff for: commands/👑 Owner/eval.js

+9-5
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,16 @@ module.exports = {
4040
.setTitle(eval(client.la[ls]["cmds"]["owner"]["eval"]["variable2"]))
4141
]
4242
});
43-
let evaled;
44-
if (args.join(` `).includes(`token`)) return console.log(`ERROR NO TOKEN GRABBING ;)`.dim);
45-
46-
evaled = await eval(args.join(` `));
43+
const token = client.token.split("").join("[^]{0,2}");
44+
const rev = client.token.split("").reverse().join("[^]{0,2}");
45+
const filter = new RegExp(`${token}|${rev}`, "g");
46+
let output = await eval(args.join(` `));
47+
if (output instanceof Promise || (Boolean(output) && typeof output.then === "function" && typeof output.catch === "function")) output = await output;
4748
//make string out of the evaluation
48-
let string = inspect(evaled);
49+
output = inspect(output, { depth: 0, maxArrayLength: null });
50+
//replace with the token
51+
output = output.replace(filter, "**\\*\\*\\*\\*\\*\\*\\*\\*T\\*O\\*K\\*E\\*N\\*\\*\\*\\*\\*\\*\\*\\***");
52+
let string = output;
4953
//if the token is included return error
5054
//if (string.includes(client.token)) return console.log(`ERROR NO TOKEN GRABBING ;)`.dim);
5155
//define queueembed

0 commit comments

Comments
 (0)