minor trolling
This commit is contained in:
parent
d54edfdeed
commit
b567de2277
1 changed files with 7 additions and 3 deletions
|
@ -22,9 +22,13 @@ client.on('message/delete', async id => {
|
|||
const targetMsg = await discordFetchMessage(bridgedMsg.discord.messageId, bridgeCfg.discord);
|
||||
if (!targetMsg) return logger.debug(`Revolt: Could not fetch message from Discord`);
|
||||
|
||||
if (targetMsg.webhookId && targetMsg.webhookId == bridgeCfg.discordWebhook.id) {
|
||||
const client = new WebhookClient({ id: bridgeCfg.discordWebhook.id, token: bridgeCfg.discordWebhook.token });
|
||||
await client.deleteMessage(bridgedMsg.discord.messageId);
|
||||
client.destroy();
|
||||
} else if (targetMsg.deletable) {
|
||||
targetMsg.delete();
|
||||
} else logger.debug(`Revolt: Unable to delete Discord message`);
|
||||
} catch(e) {
|
||||
console.error(e);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue