if(!message.member.voiceState.channelID)returnclient.createMessage(message.channel.id,`${message.author.mention}, you need to be in a voice channel first!`);
if(!message.channel.guild.members.get(client.user.id).permission.has("voiceConnect")||!message.channel.permissionsOf(client.user.id).has("voiceConnect"))returnclient.createMessage(message.channel.id,`${message.author.mention}, I can't join this voice channel!`);
if(!voiceChannel.permissionsOf(client.user.id).has("voiceConnect"))returnclient.createMessage(message.channel.id,`${message.author.mention}, I don't have permission to join this voice channel!`);
if(!music&&this.manager.voiceStates.has(message.channel.guild.id)&&this.players.get(message.channel.guild.id).type==="music")returnclient.createMessage(message.channel.id,`${message.author.mention}, I can't play a sound effect while playing music!`);
if(!message.member.voiceState.channelID)returnclient.createMessage(message.channel.id,`${message.author.mention}, you need to be in a voice channel first!`);
if(!message.channel.guild.members.get(client.user.id).voiceState.channelID)returnclient.createMessage(message.channel.id,`${message.author.mention}, I'm not in a voice channel!`);
if(this.players.get(message.channel.guild.id).host!==message.author.id)returnclient.createMessage(message.channel.id,`${message.author.mention}, only the current voice session host can stop the music!`);
awaitclient.createMessage(message.channel.id,"🔊 The current voice channel session has ended.");
};
exports.skip=async(message)=>{
if(!message.member.voiceState.channelID)returnclient.createMessage(message.channel.id,`${message.author.mention}, you need to be in a voice channel first!`);
if(!message.channel.guild.members.get(client.user.id).voiceState.channelID)returnclient.createMessage(message.channel.id,`${message.author.mention}, I'm not in a voice channel!`);
awaitclient.createMessage(message.channel.id,`🔊 Voted to skip song (${voteCount+1}/3 people have voted).`);
skipVotes.set(message.guild.id,voteCount+1);
}
}else{
player.player.stop(message.channel.guild.id);
}
};
exports.pause=async(message)=>{
if(!message.member.voiceState.channelID)returnclient.createMessage(message.channel.id,`${message.author.mention}, you need to be in a voice channel first!`);
if(!message.channel.guild.members.get(client.user.id).voiceState.channelID)returnclient.createMessage(message.channel.id,`${message.author.mention}, I'm not in a voice channel!`);
if(this.players.get(message.channel.guild.id).host!==message.author.id)returnclient.createMessage(message.channel.id,`${message.author.mention}, only the current voice session host can pause/resume the music!`);
awaitclient.createMessage(message.channel.id,`🔊 The player has been ${!player.paused?"paused":"resumed"}.`);
};
exports.playing=async(message)=>{
if(!message.member.voiceState.channelID)returnclient.createMessage(message.channel.id,`${message.author.mention}, you need to be in a voice channel first!`);
if(!message.channel.guild.members.get(client.user.id).voiceState.channelID)returnclient.createMessage(message.channel.id,`${message.author.mention}, I'm not in a voice channel!`);
if(!message.member.voiceState.channelID)returnclient.createMessage(message.channel.id,`${message.author.mention}, you need to be in a voice channel first!`);
if(!message.channel.guild.members.get(client.user.id).voiceState.channelID)returnclient.createMessage(message.channel.id,`${message.author.mention}, I'm not in a voice channel!`);
if(!message.channel.guild.members.get(client.user.id).permission.has("addReactions")&&!message.channel.permissionsOf(client.user.id).has("addReactions"))return`${message.author.mention}, I don't have the \`Add Reactions\` permission!`;
if(!message.channel.guild.members.get(client.user.id).permission.has("embedLinks")&&!message.channel.permissionsOf(client.user.id).has("embedLinks"))return`${message.author.mention}, I don't have the \`Embed Links\` permission!`;