From d110fe9c7624f91dd12a3a3f3d6cf6e230c2e62c Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sun, 16 Jan 2022 20:20:19 -0500 Subject: add no_inspect_strings flag to eval command --- src/commands/dev/eval.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/commands') diff --git a/src/commands/dev/eval.ts b/src/commands/dev/eval.ts index 4eb25dc..656eeff 100644 --- a/src/commands/dev/eval.ts +++ b/src/commands/dev/eval.ts @@ -142,6 +142,15 @@ export default class EvalCommand extends BushCommand { prompt: 'Would you like to wrap the code in an async function?', slashType: 'BOOLEAN', optional: true + }, + { + id: 'no_inspect_strings', + description: 'Whether to not inspect strings.', + match: 'flag', + flag: ['--strings', '--string'], + prompt: 'Would you like to not inspect strings?', + slashType: 'BOOLEAN', + optional: true } ], slash: true, @@ -164,6 +173,7 @@ export default class EvalCommand extends BushCommand { show_proto: ArgType<'boolean'>; show_methods: ArgType<'boolean'>; async: ArgType<'boolean'>; + no_inspect_strings: ArgType<'boolean'>; } ) { if (!message.author.isOwner()) @@ -207,7 +217,8 @@ export default class EvalCommand extends BushCommand { depth: args.sel_depth ?? 0, showHidden: args.hidden, getters: true, - showProxy: true + showProxy: true, + inspectStrings: !args.no_inspect_strings }); const methods = args.show_methods ? await util.inspectCleanRedactCodeblock(util.getMethods(rawOutput), 'js') : undefined; const proto = args.show_proto -- cgit