Skip to content

Commit

Permalink
Merge pull request #102 from spongedsc/bug/legacy-attachments-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
artifishvr authored Jul 17, 2024
2 parents 73a76f8 + 89e817d commit 0d075c4
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions src/util/models/interactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,17 +389,6 @@ export class InteractionMessageEvent {

if (imageGen === null) return await responseMsg.edit({ content: textResponse }).catch(() => null);

responseMsg
.reply({
files: [
{
attachment: imageGen,
name: "generated0.jpg",
},
],
})
.catch(() => {});

return await responseMsg
.edit({
content: final?.trim()?.length >= 2000 ? "" : final,
Expand All @@ -410,6 +399,10 @@ export class InteractionMessageEvent {
name: "response.md",
}
: null,
{
attachment: imageGen,
name: "generated0.jpg",
},
].filter((e) => e !== null),
})
.catch((e) => {
Expand Down

0 comments on commit 0d075c4

Please sign in to comment.