diff --git a/src/util/models/interactions.js b/src/util/models/interactions.js index 18bccf8..4c1f52e 100644 --- a/src/util/models/interactions.js +++ b/src/util/models/interactions.js @@ -391,13 +391,19 @@ export class InteractionMessageEvent { return responseMsg .edit({ - content: final, + content: final?.trim?.length >= 2000 ? "" : final, files: [ + final.trim().length >= 2000 + ? { + attachment: Buffer.from(final, "utf-8"), + name: "response.md", + } + : null, { attachment: imageGen, name: "generated0.jpg", }, - ], + ].filter((e) => e !== null), }) .catch(() => null); }