1 |
import BaseEvent from '../../utils/structures/BaseEvent'; |
2 |
import { FileOptions, Message } from 'discord.js'; |
3 |
import DiscordClient from '../../client/Client'; |
4 |
import CommandOptions from '../../types/CommandOptions'; |
5 |
import path from 'path'; |
6 |
import MessageEmbed from '../../client/MessageEmbed'; |
7 |
|
8 |
export default class MessageDeleteEvent extends BaseEvent { |
9 |
constructor() { |
10 |
super('messageDelete'); |
11 |
} |
12 |
|
13 |
async run(client: DiscordClient, message: Message) { |
14 |
if (message.author.bot || !message.guild || message.channel.type === 'DM' || (global as any).deletingMessages === true) |
15 |
return; |
16 |
|
17 |
await client.logger.logDelete(message); |
18 |
} |
19 |
} |