Adding the ability to join whatever vc the user is in

This commit is contained in:
ION606
2022-04-30 20:15:55 -04:00
parent edfb34b72c
commit e3b9d46998
2 changed files with 7 additions and 4 deletions
+6 -3
View File
@@ -31,9 +31,12 @@ module.exports = {
https://github.com/porridgewithraisins/jam-bot#known-bugs) https://github.com/porridgewithraisins/jam-bot#known-bugs)
const stream = await ytdl(url, { filter: 'audioonly' }); const stream = await ytdl(url, { filter: 'audioonly' });
*/ */
// const channel = bot.channels.cache.get("930148609406685227");
const channel = message.member.guild.voice.channel; if (!message.member.voice.channel) {
if (!channel) { message.reply("Please join a voice channel before you try this!"); } message.reply("Please join a voice channel before you try this!");
return;
}
const channel = bot.channels.cache.get(message.member.voice.channel.id);
const connection = joinVoiceChannel({ const connection = joinVoiceChannel({
channelId: channel.id, channelId: channel.id,
+1 -1
View File
@@ -105,4 +105,4 @@ bot.on('messageCreate', (message) => {
//Last Line //Last Line
bot.login(process.env.token); bot.login("OTQ0MDQ2OTAyNDE1MDkzNzYw.Yg76MQ.A4V6Tqvrhuvq8nCafABCBrx8uuM");