fedimbed: add reaction for posts with files

This commit is contained in:
Cynthia Foxwell 2023-01-11 16:15:52 -07:00
parent 66a1a873c9
commit 3660d1c077
1 changed files with 10 additions and 0 deletions

View File

@ -515,6 +515,12 @@ async function processUrl(msg, url, spoiler = false) {
}
}
let sendWait = false;
if (files.length > 0) {
sendWait = true;
await msg.createReaction("\uD83D\uDCE4");
}
await msg.channel
.createMessage({
content:
@ -531,6 +537,10 @@ async function processUrl(msg, url, spoiler = false) {
},
})
.then(() => {
if (sendWait) {
msg.deleteReaction("\uD83D\uDCE4");
}
if ((msg.flags & MessageFlags.SUPPRESS_EMBEDS) === 0) {
// NB: OceanicJS/Oceanic#32
//msg.edit({flags: MessageFlags.SUPPRESS_EMBEDS}).catch(() => {});