From c2e5e34088dbcdcecf262e90f32a322f7596a7ac Mon Sep 17 00:00:00 2001 From: MatteZ02 <47610069+MatteZ02@users.noreply.github.com> Date: Sun, 5 Jul 2020 17:34:39 +0300 Subject: [PATCH] patch --- package.json | 2 +- src/events/dispatcherEvents/finish.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index f39e386f..dc5357ab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "musix", - "version": "3.8.2", + "version": "3.8.3", "description": "V3 for Musix the discord music bot", "main": "./index.js", "scripts": { diff --git a/src/events/dispatcherEvents/finish.js b/src/events/dispatcherEvents/finish.js index 87c9947b..cfa5930b 100644 --- a/src/events/dispatcherEvents/finish.js +++ b/src/events/dispatcherEvents/finish.js @@ -41,8 +41,8 @@ function findSimilar(client, queue, prevSongs, guild) { let retries = 0; const query = prevSongs[Math.floor(Math.random() * Math.floor(prevSongs.length))]; - similarSongs.find( - { + if (!query || !query.track) return client.funcs.play(guild, queue.songs[0], client, 0, true); + similarSongs.find({ title: query.track.name, artist: query.track.artists[0].name, limit: 10, @@ -80,4 +80,4 @@ function findSimilar(client, queue, prevSongs, guild) { } } ); -} +} \ No newline at end of file