log music dispatcher errors

This commit is contained in:
Lukáš H 2020-06-06 10:07:27 +02:00
parent d585ffa45c
commit 8575fb7906
No known key found for this signature in database
GPG key ID: 52AED802C323B705

View file

@ -211,6 +211,8 @@ exports.play = async function (client, message, query, playNext, ignoreQueue) {
guild.channel.send('<:player:467216674622537748> Now playing: **' + v.video.title + '** `[' + exports.createTimestamp(v.video.lengthSeconds) + ']`')
// play next in queue on end
guild.dispatcher.on('error', console.error);
guild.dispatcher.once('finish', () => {
guild.queue.shift()
guild.playing = false