module.exports = {
  interaction: {
    name: "ÅŸarkÄ±-bilgi",
    description: "Å�u anda Ã§alan ÅŸarkÄ±nÄ±n bilgilerini verir."
  },
  aliases: ["np", "nowplaying", "now-playing", "ÅŸb", "ÅŸarkÄ±bilgileri", "ÅŸarkÄ±bilgi", "ÅŸarkÄ±-bilgileri"],
  category: "Music",
  cooldown: false,

  async execute(client, interaction, data) {

    if (!interaction.member.voice.channel)
      return interaction.reply({
        embeds: [{
          color: client.settings.embedColors.red,
          description: "**Â»** Bir odada deÄŸilsin. Herhangi bir odaya geÃ§ ve tekrar dene!"
        }]
      });

    if (interaction.guild.members.me.voice.channel && interaction.member.voice.channel.id !== interaction.guild.members.me.voice.channel.id)
      return interaction.reply({
        embeds: [{
          color: client.settings.embedColors.red,
          description: "**Â»** AynÄ± odada deÄŸiliz! BulunduÄŸum odaya katÄ±l ve tekrar dene!"
        }]
      });

    const queue = client.player.useQueue(interaction.guildId);

    if (!queue?.isPlaying())
      return await interaction.reply({
        embeds: [
          {
            color: client.settings.embedColors.red,
            description: "**Â»** Å�u anda bir ÅŸarkÄ± Ã§almÄ±yor."
          }
        ]
      });

    const track = queue.currentTrack;

    return await interaction.reply({
      embeds: [
        {
          color: client.settings.embedColors.default,
          author: {
            name: `${client.user.username} â€¢ Å�arkÄ± Bilgileri`,
            icon_url: client.settings.icon
          },
          title: `**Â»** ${track.title}`,
          url: track.url,
          fields: [
            { name: '**Â»** Talep Eden', value: "**â€¢** " + (track.requestedBy?.tag || "*Belirsiz*"), inline: true },
            { name: '**Â»** Ses YÃ¼ksekliÄŸi', value: "**â€¢** %" + queue.node.volume, inline: true },
            {
              name: '**Â»** Tekrarlama Modu',
              value: queue.repeatMode == 2 ? '**â€¢** Mevcut sÄ±ra tekrarlanÄ±yor.' : queue.repeatMode == 1 ? '**â€¢** Mevcut ÅŸarkÄ± tekrarlanÄ±yor.' : '**â€¢** KapalÄ±',
              inline: true
            },
            {
              name: `**Â»** Bassboost \`/bassboost\``,
              value: `**â€¢** ${queue.filters.ffmpeg.isEnabled("bassboost") ? "AÃ‡IK! ğŸ¤¯" : "KapalÄ±"}`,
              inline: false
            },
            { name: '**Â»** Å�arkÄ± SÃ¶zleri', value: `**â€¢** Å�arkÄ± sÃ¶zleri iÃ§in \`/ÅŸarkÄ±-sÃ¶zleri\` komutunu kullanabilirsin!`, inline: false },
            { name: `**Â»** SayaÃ§ Ã‡ubuÄŸu`, value: "**â€¢** " + queue.node.createProgressBar({ timecodes: true }), inline: false }
            //{ name: '**Â»** Kanal', value: "**â€¢** " + track.author, inline: true },
            //{ name: '**Â»** Ä°zlenme SayÄ±sÄ±', value: "**â€¢** " + new Intl.NumberFormat().format(track.views), inline: true },
            //{ name: '**Â»** SÃ¼resi', value: "**â€¢** " + track.duration, inline: true },
            //{ name: '**Â»** Aktif Efektler', value: "**â€¢** " + filters.length + '/' + client.filters.length, inline: true },
            //{ name: '**Â»** Durduruldu Mu?', value: queue.connection.paused ? '**â€¢** Yes' : '**â€¢** HayÄ±r', inline: true },
            //{ name: '**Â»** Oynatma Listesinden Mi?', value: track.fromPlaylist ? '**â€¢** Evet' : '**â€¢** HayÄ±r', inline: true },
          ],
          thumbnail: { url: track.thumbnail }
        }
      ]
    });
  },
};