1
0
Fork 0

another fix attempt on eval

refactor/models
Matthew 2019-10-27 21:53:16 -04:00
parent d8049997a2
commit 5ce5b7f64d
No known key found for this signature in database
GPG Key ID: 766BE43AE75F7559
1 changed files with 2 additions and 5 deletions

View File

@ -19,7 +19,6 @@ export default class Eval extends Command {
try { try {
// const evalMessage = message.content.slice(this.client.config.prefix.length).split(' ').slice(1).join(' '); // const evalMessage = message.content.slice(this.client.config.prefix.length).split(' ').slice(1).join(' ');
let evaled: any; let evaled: any;
let output: string;
try { try {
evaled = await eval(args.join(' ').trim()); evaled = await eval(args.join(' ').trim());
@ -27,7 +26,7 @@ export default class Eval extends Command {
evaled = inspect(evaled, { depth: 0 }); evaled = inspect(evaled, { depth: 0 });
} }
} catch (error) { } catch (error) {
output = error.stack; evaled = error.stack;
} }
/* /*
@ -38,9 +37,7 @@ export default class Eval extends Command {
} }
*/ */
this.client.signale.debug(output); const display = this.client.util.splitString(evaled, 1975);
const display = this.client.util.splitString(output, 1975);
this.client.signale.debug(display);
if (display[5]) { if (display[5]) {
try { try {
const { data } = await axios.post('https://snippets.cloud.libraryofcode.org/documents', display.join('')); const { data } = await axios.post('https://snippets.cloud.libraryofcode.org/documents', display.join(''));