diff --git a/commands/general/exec.js b/commands/general/exec.js index d1744e7..31eb960 100644 --- a/commands/general/exec.js +++ b/commands/general/exec.js @@ -15,17 +15,17 @@ class ExecCommand extends Command { const code = this.options.cmd ?? this.args.join(" "); try { const execed = await exec(code); - if (execed.stderr) return `${await clean(execed.stderr)}`; + if (execed.stderr) return { html: `
${await clean(execed.stderr)}
` }; const cleaned = await clean(execed.stdout); const sendString = `${cleaned}`; - if (sendString.length >= 2000) { + if (sendString.length >= 4000) { return { text: "The result was too large, so here it is as a file:", file: cleaned, name: "result.txt" }; } else { - return sendString; + return { html: "
"+sendString+"
" }; } } catch (err) { return `\`ERROR\` ${await clean(err)}`;