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
1 changed files with 5 additions and 3 deletions

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,
name: "result.txt"
content: "The result was too large, so here it is as a file:",
files: [{
contents: cleaned,
name: "result.txt"
}]
};
} else {
return sendString;