import { Events } from 'discord.js';
import type { BotContext } from '../../types.js';
import { touchTicketActivity } from './service.js';

export function registerTicketEvents(context: BotContext): void {
  context.client.on(Events.MessageCreate, async (message) => {
    if (message.author.bot || !message.guildId) {
      return;
    }
    await touchTicketActivity(context, message.channelId);
  });
}
