mirror of
https://github.com/janderedev/automod.git
synced 2024-12-22 10:45:27 +00:00
minor trolling
This commit is contained in:
parent
d54edfdeed
commit
b567de2277
|
@ -22,9 +22,13 @@ client.on('message/delete', async id => {
|
||||||
const targetMsg = await discordFetchMessage(bridgedMsg.discord.messageId, bridgeCfg.discord);
|
const targetMsg = await discordFetchMessage(bridgedMsg.discord.messageId, bridgeCfg.discord);
|
||||||
if (!targetMsg) return logger.debug(`Revolt: Could not fetch message from Discord`);
|
if (!targetMsg) return logger.debug(`Revolt: Could not fetch message from Discord`);
|
||||||
|
|
||||||
const client = new WebhookClient({ id: bridgeCfg.discordWebhook.id, token: bridgeCfg.discordWebhook.token });
|
if (targetMsg.webhookId && targetMsg.webhookId == bridgeCfg.discordWebhook.id) {
|
||||||
await client.deleteMessage(bridgedMsg.discord.messageId);
|
const client = new WebhookClient({ id: bridgeCfg.discordWebhook.id, token: bridgeCfg.discordWebhook.token });
|
||||||
client.destroy();
|
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) {
|
} catch(e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue