fix exec formatting

This commit is contained in:
murm 2023-03-15 10:57:57 -04:00
parent 52ba089e43
commit 0fe3a9ddac

View file

@ -17,7 +17,7 @@ class ExecCommand extends Command {
const execed = await exec(code);
if (execed.stderr) return `${await clean(execed.stderr)}`;
const cleaned = await clean(execed.stdout);
const sendString = `\`\`\`bash\n${cleaned}\n\`\`\``;
const sendString = `${cleaned}`;
if (sendString.length >= 2000) {
return {
text: "The result was too large, so here it is as a file:",
@ -28,7 +28,7 @@ class ExecCommand extends Command {
return sendString;
}
} catch (err) {
return `\`ERROR\` \`\`\`xl\n${await clean(err)}\n\`\`\``;
return `\`ERROR\` ${await clean(err)}`;
}
}