Fix eval on large outputs
This commit is contained in:
parent
d236179639
commit
3272429cf6
1 changed files with 5 additions and 3 deletions
|
@ -17,9 +17,11 @@ class EvalCommand extends Command {
|
||||||
const sendString = `\`\`\`js\n${cleaned}\n\`\`\``;
|
const sendString = `\`\`\`js\n${cleaned}\n\`\`\``;
|
||||||
if (sendString.length >= 2000) {
|
if (sendString.length >= 2000) {
|
||||||
return {
|
return {
|
||||||
text: "The result was too large, so here it is as a file:",
|
content: "The result was too large, so here it is as a file:",
|
||||||
file: cleaned,
|
files: [{
|
||||||
name: "result.txt"
|
contents: cleaned,
|
||||||
|
name: "result.txt"
|
||||||
|
}]
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
return sendString;
|
return sendString;
|
||||||
|
|
Loading…
Reference in a new issue