forked from engineering/cloudservices
another fix attempt on eval
parent
d8049997a2
commit
5ce5b7f64d
|
@ -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(''));
|
||||||
|
|
Loading…
Reference in New Issue