From 617dc69e4a25803ef6e0d43f8fb829be617789ed Mon Sep 17 00:00:00 2001 From: Navy Date: Fri, 1 May 2020 17:12:45 +0300 Subject: [PATCH] some thing to eval --- .../components/commands/developer/Evaluate.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/structure/client/components/commands/developer/Evaluate.js b/structure/client/components/commands/developer/Evaluate.js index 07ff508..f9431c1 100644 --- a/structure/client/components/commands/developer/Evaluate.js +++ b/structure/client/components/commands/developer/Evaluate.js @@ -54,23 +54,24 @@ class Evaluate extends Command { if(args.log) this.client.logger.debug(`[${message.author.tag}] Evaluation Result: ${evaled}`); - if(evaled.length > 2000) evaled = `${evaled.substring(0, 1900)}...`; - await message.respond(stripIndents`Evaluation was successful. - \`\`\`js - ${evaled}\`\`\``, - { emoji: 'success' }); + if (evaled.length > 1850) { + console.log(evaled); + evaled = `${evaled.substring(0, 1850)}...`; + } + await message.respond(`Evaluation was successful.\`\`\`js\n${evaled}\`\`\``, + { emoji: 'success' }); } catch(error) { - let message = `${error}${error.stack ? `\n${error.stack}` : ''}`; + let msg = `${error}${error.stack ? `\n${error.stack}` : ''}`; - if(args.log) this.client.logger.debug(`[${message.author.tag}] Evaluation Failed: ${message}`); + if(args.log) this.client.logger.debug(`[${message.author.tag}] Evaluation Failed: ${msg}`); - if(message.length > 2000) message = `${message.substring(0, 1900)}...`; + if(msg.length > 2000) msg = `${msg.substring(0, 1900)}...`; await message.respond(stripIndents`Evaluation failed. \`\`\`js - ${message}\`\`\``, + ${msg}\`\`\``, { emoji: 'failure' }); }