From b26c8ca38f09cffc70706d1c550c63a371c50abc Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Fri, 25 Mar 2022 22:24:49 -0400 Subject: Doing some fixes --- bot.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'bot.js') diff --git a/bot.js b/bot.js index cbc6bd6..6ffaf5b 100644 --- a/bot.js +++ b/bot.js @@ -31,7 +31,7 @@ let txtFile = true; bot.login(config.token); -function joinChannel() { +function voiceInit() { bot.channels.fetch(config.voiceChannel).then(channel => { const connection = joinVoiceChannel({ channelId: channel.id, @@ -123,7 +123,7 @@ bot.on('ready', () => { if (!statusChannel) return console.error('The status channel does not exist! Skipping.'); statusChannel.send({ embeds: [readyEmbed]}); - joinChannel(); + voiceInit(); }); @@ -171,8 +171,7 @@ bot.on('messageCreate', async msg => { if (command == 'join') { msg.reply('Joining voice channel.'); - console.log('Connected to the voice channel.'); - joinChannel(); + voiceInit(); } if (command == 'resume') { -- cgit v1.2.3