diff options
-rw-r--r-- | src/commands/admin/channelPermissions.ts | 2 | ||||
-rw-r--r-- | src/commands/dev/eval.ts | 4 | ||||
-rw-r--r-- | src/commands/dev/javascript.ts | 6 | ||||
-rw-r--r-- | src/lib/extensions/discord-akairo/BushClientUtil.ts | 2 | ||||
-rw-r--r-- | src/listeners/commands/commandError.ts | 3 |
5 files changed, 8 insertions, 9 deletions
diff --git a/src/commands/admin/channelPermissions.ts b/src/commands/admin/channelPermissions.ts index 4091343..d58a7da 100644 --- a/src/commands/admin/channelPermissions.ts +++ b/src/commands/admin/channelPermissions.ts @@ -83,7 +83,7 @@ export default class ChannelPermissionsCommand extends BushCommand { { reason: 'Changing overwrites for mass channel perms command' } ); } catch (e) { - void client.console.error('channelPermissions', util.formatError(e, true)); + void client.console.error('channelPermissions', util.formatError(e, false)); failedChannels.push(channel); } } diff --git a/src/commands/dev/eval.ts b/src/commands/dev/eval.ts index d4c9331..8af280d 100644 --- a/src/commands/dev/eval.ts +++ b/src/commands/dev/eval.ts @@ -263,12 +263,12 @@ export default class EvalCommand extends BushCommand { if (inputTS) embed.addFields([{ name: ':inbox_tray: Input (typescript)', value: inputTS }]); embed.addFields([{ name: `:inbox_tray: Input${inputTS ? ' (transpiled javascript)' : ''}`, value: inputJS }]); - const output = await this.codeblock(rawResult, 'ansi', { + const output = await this.codeblock(rawResult, 'js', { depth: selDepth ?? 0, showHidden: hidden, showProxy: true, inspectStrings: !noInspectStrings, - colors: true + colors: false }); const methods = !err && showMethods ? await this.codeblock(rawResult, 'ts', { methods: true }) : undefined; diff --git a/src/commands/dev/javascript.ts b/src/commands/dev/javascript.ts index 373f149..be8fdce 100644 --- a/src/commands/dev/javascript.ts +++ b/src/commands/dev/javascript.ts @@ -60,11 +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, 'ansi', { + const output = await util.inspectCleanRedactCodeblock(rawOutput, 'js', { depth: args.sel_depth ?? 0, getters: true, inspectStrings: true, - colors: true + colors: false }); embed.setTitle(`${util.emojis.successFull} Successfully Evaluated Expression`).setColor(util.colors.success); @@ -76,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, 'ansi', { colors: true }) } + { name: '📤 Error', value: await util.inspectCleanRedactCodeblock(e, 'js', { colors: false }) } ]); } diff --git a/src/lib/extensions/discord-akairo/BushClientUtil.ts b/src/lib/extensions/discord-akairo/BushClientUtil.ts index 5c641b6..9fe70fa 100644 --- a/src/lib/extensions/discord-akairo/BushClientUtil.ts +++ b/src/lib/extensions/discord-akairo/BushClientUtil.ts @@ -685,7 +685,7 @@ export class BushClientUtil extends ClientUtil { * @param error */ public async handleError(context: string, error: Error) { - await client.console.error(_.camelCase(context), `An error occurred:\n${util.formatError(error, true)}`, false); + await client.console.error(_.camelCase(context), `An error occurred:\n${util.formatError(error, false)}`, false); await client.console.channelError({ embeds: await CommandErrorListener.generateErrorEmbed({ type: 'unhandledRejection', error: error, context }) }); diff --git a/src/listeners/commands/commandError.ts b/src/listeners/commands/commandError.ts index 57802bd..f830cca 100644 --- a/src/listeners/commands/commandError.ts +++ b/src/listeners/commands/commandError.ts @@ -41,7 +41,6 @@ export default class CommandErrorListener extends BushListener { } }); - client.console.debug(util.getSymbols(error).map((s) => s.toString())); void client.console.error( `${isSlash ? 'slashC' : 'c'}ommandError`, `an error occurred with the <<${command}>> ${isSlash ? 'slash ' : ''}command in <<${channel}>> triggered by <<${ @@ -231,7 +230,7 @@ export default class CommandErrorListener extends BushListener { } public static async getErrorStack(error: Error | any): Promise<string> { - return await util.inspectCleanRedactCodeblock(error /* util.formatError(error, true) */, 'ansi', { colors: true }, 4000); + return await util.inspectCleanRedactCodeblock(error, 'js', { colors: false }, 4000); } } |