From edfb34b72c78e43f0af4e6a2b0f6f2633281b583 Mon Sep 17 00:00:00 2001 From: ION606 Date: Sat, 30 Apr 2022 19:36:07 -0400 Subject: [PATCH] Adding the ability to join whatever vc the user is in --- commands/playAudio.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/commands/playAudio.js b/commands/playAudio.js index 8495475..b0d1b89 100644 --- a/commands/playAudio.js +++ b/commands/playAudio.js @@ -31,7 +31,10 @@ module.exports = { https://github.com/porridgewithraisins/jam-bot#known-bugs) const stream = await ytdl(url, { filter: 'audioonly' }); */ - const channel = bot.channels.cache.get("930148609406685227"); + // const channel = bot.channels.cache.get("930148609406685227"); + const channel = message.member.guild.voice.channel; + if (!channel) { message.reply("Please join a voice channel before you try this!"); } + const connection = joinVoiceChannel({ channelId: channel.id, guildId: channel.guild.id,