bot.exec: some escape code fixes to minimize overflowing

though a lot of it is on discord's end with their implementation of ansi
codeblocks, since that is very much a non-stock feature of hljs
This commit is contained in:
Cynthia Foxwell 2022-12-04 18:06:27 -07:00
parent 055d034f02
commit 51ead27368

View file

@ -131,7 +131,9 @@ exec.callback = async function (msg, line) {
});
proc.on("close", async (code) => {
out += `\x1b[1m====\n${code != 0 ? "\x1b[31m" : ""}Exited with ${code}`;
out += `\n\x1b[0m\x1b[1m====\x1b[0m\n\x1b[1m${
code != 0 ? "\x1b[31m" : ""
}Exited with ${code}\x1b[0m`;
if (out.length > 1980) {
const haste = await hastebin(out);
msg.channel.createMessage({