Skip to content

Commit d1c8d9c

Browse files
authored
Merge pull request #166 from Retsam/fix-edit-link
fix: bot message clears after editing playground link out of message
2 parents fc5a81d + ed7722c commit d1c8d9c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/modules/playground.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,10 @@ export class PlaygroundModule extends Module {
101101
const exec = PLAYGROUND_REGEX.exec(msg.content);
102102
if (msg.author.bot || !this.editedLongLink.has(msg.id) || exec) return;
103103
const botMsg = this.editedLongLink.get(msg.id);
104-
await botMsg?.edit('');
104+
// Edit the message to only have the embed and not the "please edit your message" message
105+
await botMsg?.edit('', {
106+
embed: botMsg.embeds[0],
107+
});
105108
this.editedLongLink.delete(msg.id);
106109
}
107110
}

0 commit comments

Comments
 (0)