Skip to content

Commit

Permalink
I misplaced a bracket, so instead I'm splitting this up.
Browse files Browse the repository at this point in the history
  • Loading branch information
zaza7 committed Sep 2, 2018
1 parent 13eaecf commit 377167f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/encoders/lavalink.js
Expand Up @@ -65,9 +65,11 @@ module.exports = {
return (result.body.tracks)
},
addTracks: async (msg, tracks) => {
if (guildInfo[msg.channel.guild.id] !== undefined && guildInfo[msg.channel.guild.id].tracks.length <= 0) {
let player = await global.bot.voiceConnections.get(msg.channel.guild.id)
player.play(tracks[0].track)
if (guildInfo[msg.channel.guild.id] !== undefined) {
if (guildInfo[msg.channel.guild.id].tracks.length <= 0) {
let player = await global.bot.voiceConnections.get(msg.channel.guild.id)
player.play(tracks[0].track)
}
for (let track of tracks) {
track.requester = msg.author.id
guildInfo[msg.channel.guild.id].tracks.push(track)
Expand Down

0 comments on commit 377167f

Please sign in to comment.