1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-12-22 18:03:17 +00:00

Chore update 3.8.2

This commit is contained in:
MatteZ02 2020-07-05 16:59:21 +03:00
parent 8e485cc5c0
commit 2aca6b9c96
3 changed files with 11 additions and 13 deletions

View File

@ -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"
}
}
}

View File

@ -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) {
}
}
);
}
}

View File

@ -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> ",
};
};