Fix eval on large outputs

This commit is contained in:
Essem 2023-03-14 18:12:29 -05:00
parent d236179639
commit 3272429cf6
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C

View file

@ -17,9 +17,11 @@ class EvalCommand extends Command {
const sendString = `\`\`\`js\n${cleaned}\n\`\`\``;
if (sendString.length >= 2000) {
return {
text: "The result was too large, so here it is as a file:",
file: cleaned,
content: "The result was too large, so here it is as a file:",
files: [{
contents: cleaned,
name: "result.txt"
}]
};
} else {
return sendString;