From 4eca40d2de4091025eb216bc202b649f9dc69d92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hor=C3=A1=C4=8Dek?= Date: Tue, 14 Apr 2020 15:11:35 +0200 Subject: [PATCH] fix music --- helpers/music.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/helpers/music.js b/helpers/music.js index 33a8c0c..e5e562a 100644 --- a/helpers/music.js +++ b/helpers/music.js @@ -132,9 +132,11 @@ module.exports = client => { } } + + if (!video && videos[0]) { video = videos[0] - } else { + } else if(!video) { video = videos } @@ -153,9 +155,7 @@ module.exports = client => { const connection = await vc.join() const v = guild.queue[0] - - console.log(v.video) - + guild.dispatcher = connection.play(await ytdl(client.music.getLinkFromID(v.video.videoId), { highWaterMark: 1024 * 1024 * 32 }), { type: 'opus' }) guild.dispatcher.setVolume(0.25)