File tree 1 file changed +9
-5
lines changed
1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -40,12 +40,16 @@ module.exports = {
40
40
. setTitle ( eval ( client . la [ ls ] [ "cmds" ] [ "owner" ] [ "eval" ] [ "variable2" ] ) )
41
41
]
42
42
} ) ;
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 ;
47
48
//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 ;
49
53
//if the token is included return error
50
54
//if (string.includes(client.token)) return console.log(`ERROR NO TOKEN GRABBING ;)`.dim);
51
55
//define queueembed
You can’t perform that action at this time.
0 commit comments