diff --git a/package.json b/package.json index 3b107e3b..f39e386f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "musix", - "version": "3.8.1", + "version": "3.8.2", "description": "V3 for Musix the discord music bot", "main": "./index.js", "scripts": { @@ -48,4 +48,4 @@ "ytsr": "^0.1.15", "zlib-sync": "^0.1.6" } -} +} \ No newline at end of file diff --git a/src/events/dispatcherEvents/finish.js b/src/events/dispatcherEvents/finish.js index aafcfc13..87c9947b 100644 --- a/src/events/dispatcherEvents/finish.js +++ b/src/events/dispatcherEvents/finish.js @@ -28,11 +28,8 @@ module.exports = { !queue.songs[0] && queue.endReason !== "stop" ) { - const prevSongs = queue.prevSongs.filter( - (song) => song.type == "spotify" - ); - if (prevSongs.length >= 0) - return findSimilar(client, queue, prevSongs, guild); + if (queue.prevSongs.length > 0) + return findSimilar(client, queue, queue.prevSongs, guild); } } } @@ -44,8 +41,8 @@ function findSimilar(client, queue, prevSongs, guild) { let retries = 0; const query = prevSongs[Math.floor(Math.random() * Math.floor(prevSongs.length))]; - if (!query) return; - similarSongs.find({ + similarSongs.find( + { title: query.track.name, artist: query.track.artists[0].name, limit: 10, @@ -69,6 +66,7 @@ function findSimilar(client, queue, prevSongs, guild) { author: {}, type: "ytdl", info: songInfo.videoDetails, + track: query.track, }); client.funcs.play(guild, queue.songs[0], client, 0, true); } else { @@ -82,4 +80,4 @@ function findSimilar(client, queue, prevSongs, guild) { } } ); -} \ No newline at end of file +} diff --git a/src/struct/config/config.js b/src/struct/config/config.js index 17a79217..05164005 100644 --- a/src/struct/config/config.js +++ b/src/struct/config/config.js @@ -24,7 +24,7 @@ module.exports = { embedColor: "#b50002", invite: "https://musix-web.herokuapp.com/releases", supportServer: "https://musix-web.herokuapp.com/discord", - devMode: false, + devMode: true, api: false, saveDB: true, respawn: true, @@ -40,7 +40,7 @@ module.exports = { djrole: null, startPlaying: true, bass: 1, - autoPlay: true, + autoPlay: false, }; module.exports.streamConfig = { @@ -99,4 +99,4 @@ module.exports.emojis = { stop: "<:stop:674685626108477519> ", stopWatch: ":stopwatch: ", volumeHigh: "<:volumehigh:674685637626167307> ", -}; \ No newline at end of file +};