fedimbed: add reaction for posts with files
This commit is contained in:
parent
66a1a873c9
commit
3660d1c077
1 changed files with 10 additions and 0 deletions
|
@ -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(() => {});
|
||||
|
|
Loading…
Reference in a new issue