aboutsummaryrefslogtreecommitdiff
path: root/src/commands/dev/javascript.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/dev/javascript.ts')
-rw-r--r--src/commands/dev/javascript.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/commands/dev/javascript.ts b/src/commands/dev/javascript.ts
index d25b790..373f149 100644
--- a/src/commands/dev/javascript.ts
+++ b/src/commands/dev/javascript.ts
@@ -60,10 +60,11 @@ export default class JavascriptCommand extends BushCommand {
const rawOutput = /^(9\s*?\+\s*?10)|(10\s*?\+\s*?9)$/.test(code)
? '21'
: new VM({ eval: true, wasm: true, timeout: 1_000, fixAsync: true }).run(`${code}`);
- const output = await util.inspectCleanRedactCodeblock(rawOutput, 'js', {
+ const output = await util.inspectCleanRedactCodeblock(rawOutput, 'ansi', {
depth: args.sel_depth ?? 0,
getters: true,
- inspectStrings: true
+ inspectStrings: true,
+ colors: true
});
embed.setTitle(`${util.emojis.successFull} Successfully Evaluated Expression`).setColor(util.colors.success);
@@ -75,7 +76,7 @@ export default class JavascriptCommand extends BushCommand {
embed.setTitle(`${util.emojis.errorFull} Unable to Evaluate Expression`).setColor(util.colors.error);
embed.addFields([
{ name: '📥 Input', value: input },
- { name: '📤 Error', value: await util.inspectCleanRedactCodeblock(e, 'js') }
+ { name: '📤 Error', value: await util.inspectCleanRedactCodeblock(e, 'ansi', { colors: true }) }
]);
}