import { SlashCommandBuilder, ChatInputCommandInteraction } from 'discord.js';
import { SlashCommand } from '../../utils/types';
import { context } from '../../config/context';

const command: SlashCommand = {
  guildOnly: true,
  data: new SlashCommandBuilder().setName('stop').setDescription('Stoppt die Wiedergabe und leert die Queue.'),
  async execute(interaction: ChatInputCommandInteraction) {
    if (!interaction.guildId) return;
    context.music.stop(interaction.guildId);
    await interaction.reply({ content: 'Musik gestoppt und Queue geleert.' });
  }
};

export default command;
