Skip to content

Commit

Permalink
long responses using the imagine module should return an updated image
Browse files Browse the repository at this point in the history
  • Loading branch information
daniwasonline committed May 19, 2024
1 parent bc87030 commit 1359b0b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/util/models/interactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 1359b0b

Please sign in to comment.