some thing to eval
This commit is contained in:
parent
b20d409e24
commit
617dc69e4a
@ -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}\`\`\``,
|
||||
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' });
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user