import { Message } from 'discord.js';
import { EventHandler } from '../utils/types';
import { context } from '../config/context';

const event: EventHandler = {
  name: 'messageUpdate',
  execute(oldMessage: Message | null, newMessage: Message) {
    if (!oldMessage) return;
    context.logging.logMessageEdit(oldMessage, newMessage);
  }
};

export default event;
