if(!client.config.botSwitches.music&&!client.config.whitelist.includes(interaction.user.id))returninteraction.reply({content:'Music module is currently disabled.',ephemeral:true});
if(!client.isStaff(interaction.member)&&!client.config.whitelist.includes(interaction.member.id))returninteraction.reply('This command is in early stages of development, some parts may be missing or broken.\nIt has been restricted to staff for time-being.');
if(!voiceCh)returninteraction.reply('Please join a voice channel first to use the command.');
player.nodes.create(interaction.guildId,{
metadata:{
channel: interaction.channel,
client: interaction.guild.members.me,
requestedBy: interaction.member
},
selfDeaf: true,
volume: 75,
skipOnNoStream: true,
leaveOnEnd: false,
leaveOnEmpty: false,
bufferingTimeout: 30000,
connectionTimeout: 25000,
strategy:'FIFO'
});
({
play: async()=>{
consturl=interaction.options.getString('url');
if(!url.includes('https://open.spotify.com/'))returninteraction.reply('Sorry, I can\'t play that. I can only accept Spotify links that contains `https://open.spotify.com/`');
awaitinteraction.reply({embeds:[newclient.embed().setColor(client.config.embedColor).setTitle(`Songs currently in the queue: ${queue.tracks.size}`).setDescription(queue.tracks.size>0?`${queue.tracks.map(i=>`**${i.title}** - **${i.author}**`).join('\n')}`:'*No songs currently queued.*')]}).catch(()=>interaction.channel.send('I cannot send an embed that hits beyond the character limit.'))