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