InvisibleChat: fix embeds missing decrypted content (#2655)

This commit is contained in:
Hen 2024-07-13 19:17:00 +02:00 committed by GitHub
parent 92ae62602b
commit 0e7570ad71
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -133,10 +133,12 @@ export default definePlugin({
message: message, message: message,
channel: ChannelStore.getChannel(message.channel_id), channel: ChannelStore.getChannel(message.channel_id),
onClick: async () => { onClick: async () => {
await iteratePasswords(message).then((res: string | false) => { const res = await iteratePasswords(message);
if (res) return void this.buildEmbed(message, res);
return void buildDecModal({ message }); if (res)
}); this.buildEmbed(message, res);
else
buildDecModal({ message });
} }
} }
: null; : null;
@ -169,9 +171,9 @@ export default definePlugin({
message.embeds.push({ message.embeds.push({
type: "rich", type: "rich",
title: "Decrypted Message", rawTitle: "Decrypted Message",
color: "0x45f5f5", color: "0x45f5f5",
description: revealed, rawDescription: revealed,
footer: { footer: {
text: "Made with ❤️ by c0dine and Sammy!", text: "Made with ❤️ by c0dine and Sammy!",
}, },