Revert "play: check if bot is already connected"

This reverts commit 86ae74f2e3.
This commit is contained in:
Androz2091 2020-01-12 20:05:33 +01:00
parent d44d65bf15
commit 515c8757ed

View file

@ -95,13 +95,11 @@ class Player {
// Searches the song
let video = await Util.getFirstYoutubeResult(songName, this.SYA);
if(!video) reject('Song not found');
if(!voiceChannel.guild.me.voice.channel || (voiceChannel.guild.me.voice.channel.id !== voiceChannel.id)){
// Joins the voice channel
await voiceChannel.join();
}
// Joins the voice channel
let connection = await voiceChannel.join();
// Creates a new guild with data
let queue = new Queue(voiceChannel.guild.id);
queue.connection = voiceChannel.guild.me.voice.connection;
queue.connection = connection;
let song = new Song(video, queue);
queue.songs.push(song);
// Add the queue to the list