Revert "play: check if bot is already connected"
This reverts commit 86ae74f2e3
.
This commit is contained in:
parent
d44d65bf15
commit
515c8757ed
1 changed files with 3 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue