Whenever I use the skip command on the last song of the queue, it skips the song but the bot will crash showing this error in the terminal (CMD). Here is the code:
else if (cmd === "skip") {
let queue = distube.getQueue(message.guild.id);
let channel = message.member.voice.channel;
if (!channel) {
return message.channel.send(`** You need to Join Voice Channel **`)
}
if (!queue) {
return message.channel.send(`** Nothing Playing **`)
}
queue.skip();}