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

const event: EventHandler = {
  name: 'voiceStateUpdate',
  async execute(oldState: VoiceState, newState: VoiceState) {
    await context.dynamicVoice.handleVoiceStateUpdate(oldState, newState);
  }
};

export default event;
