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

const command: SlashCommand = {
  data: new SlashCommandBuilder().setName('help').setDescription('Zeigt Befehle und Module.'),
  async execute(interaction: ChatInputCommandInteraction) {
    const avatar = interaction.client.user?.displayAvatarURL({ size: 256 }) ?? null;
    const embed = new EmbedBuilder()
      .setTitle('✨ Papo Hilfe')
      .setColor(0xf97316)
      .setThumbnail(avatar)
      .setDescription('Dein All-in-One Assistant: Tickets, Automod, Musik, Stats, Dashboard.')
      .addFields(
        { name: '🛡️ Admin', value: '`/ban` `/kick` `/mute` `/timeout` `/clear`', inline: false },
        { name: '🎫 Tickets', value: '`/ticket` `/ticketpanel` `/ticketpriority` `/ticketstatus` `/transcript`', inline: false },
        { name: '🎵 Musik', value: '`/play` `/pause` `/resume` `/skip` `/stop` `/queue` `/loop`', inline: false },
        { name: '📊 Server-Tools', value: '`/configure` `/serverinfo` `/rank`', inline: false }
      )
      .setFooter({ text: 'Tipp: Nutze /configure für Module & Dashboard-Link' });
    await interaction.reply({ embeds: [embed], ephemeral: true });
  }
};

export default command;
