DiscordJS-Template/events/messages/messageDelete.js

14 lines
401 B
JavaScript
Raw Normal View History

2024-02-08 20:11:56 +00:00
import { Events } from 'discord.js';
import { Message } from '../../database.js';
export const name = Events.MessageDelete;
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.`);
}