try {
const connection = joinVoiceChannel({
channelId: member.voice.channel/channelId,
guildId: channel.guild.id,
adapterCreator: channel.guild.voiceAdapterCreator,
});
console.log('I have joined a voice channel!');
play(msg.guild, queueContruct.songs[0]);
} catch (err) {
console.log(err);
queue.delete(msg.guild.id);
return msg.channel.send(err);
}
} else {
serverQueue.songs.push(song);
return msg.channel.send(`${song.title} has been added to the queue!`);
console.log('i have added a song to the queue');
}
}
try {
const connection = joinVoiceChannel({
channelId: member.voice.channel/channelId,
guildId: channel.guild.id,
adapterCreator: channel.guild.voiceAdapterCreator,
});
console.log('I have joined a voice channel!');
play(msg.guild, queueContruct.songs[0]);
} catch (err) {
console.log(err);
queue.delete(msg.guild.id);
return msg.channel.send(err);
}
} else {
serverQueue.songs.push(song);
return msg.channel.send(`${song.title} has been added to the queue!`);
console.log('i have added a song to the queue');
}
}