2024-02-08 20:11:56 +00:00
|
|
|
import { Message } from '../../database.js';
|
2024-02-11 01:04:12 +00:00
|
|
|
import { Events } from 'discord.js';
|
2024-02-08 20:11:56 +00:00
|
|
|
|
|
|
|
export const name = Events.MessageDelete;
|
2024-02-11 01:04:12 +00:00
|
|
|
/** @param {import('discord.js').Message} message */
|
2024-02-08 20:11:56 +00:00
|
|
|
export async function execute(message) {
|
|
|
|
// Delete message entry once message is deleted itself
|
|
|
|
const count = await Message.destroy({
|
|
|
|
where: {
|
|
|
|
id: message.id
|
|
|
|
}
|
|
|
|
});
|
|
|
|
if (count > 0) console.info(`[INFO] Reaction Roles Message with ID '${message.id}' was deleted.`);
|
|
|
|
}
|