forked from PluralFlux/PluralFlux
removed ability to send attachments since i think fluxer deletes them from the server when a message is deleted :(
This commit is contained in:
@@ -43,13 +43,7 @@ async function replaceMessage(client, message, text, member) {
|
|||||||
const channel = client.channels.get(message.channelId);
|
const channel = client.channels.get(message.channelId);
|
||||||
const webhook = await getOrCreateWebhook(client, channel).catch((e) =>{throw e});
|
const webhook = await getOrCreateWebhook(client, channel).catch((e) =>{throw e});
|
||||||
const username = member.displayname ?? member.name;
|
const username = member.displayname ?? member.name;
|
||||||
if (message.attachments.size > 0) {
|
await webhook.send({content: text, username: username, avatar_url: member.propic});
|
||||||
const embeds = createAttachmentEmbedsForWebhook(webhook, message.attachments);
|
|
||||||
await webhook.send({username: username, avatar_url: member.propic, embeds: embeds});
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
await webhook.send({content: text, username: username, avatar_url: member.propic});
|
|
||||||
}
|
|
||||||
await message.delete();
|
await message.delete();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user