fix music

This commit is contained in:
Lukáš Horáček 2020-04-14 15:11:35 +02:00
parent 6748f1fb03
commit 4eca40d2de
No known key found for this signature in database
GPG key ID: E07D6630DBC17195

View file

@ -132,9 +132,11 @@ module.exports = client => {
} }
} }
if (!video && videos[0]) { if (!video && videos[0]) {
video = videos[0] video = videos[0]
} else { } else if(!video) {
video = videos video = videos
} }
@ -154,8 +156,6 @@ module.exports = client => {
const v = guild.queue[0] 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 = connection.play(await ytdl(client.music.getLinkFromID(v.video.videoId), { highWaterMark: 1024 * 1024 * 32 }), { type: 'opus' })
guild.dispatcher.setVolume(0.25) guild.dispatcher.setVolume(0.25)