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
1 changed files with 4 additions and 4 deletions

View File

@ -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)