1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-11-10 05:10: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", "name": "musix",
"version": "3.8.1", "version": "3.8.2",
"description": "V3 for Musix the discord music bot", "description": "V3 for Musix the discord music bot",
"main": "./index.js", "main": "./index.js",
"scripts": { "scripts": {

View File

@ -28,11 +28,8 @@ module.exports = {
!queue.songs[0] && !queue.songs[0] &&
queue.endReason !== "stop" queue.endReason !== "stop"
) { ) {
const prevSongs = queue.prevSongs.filter( if (queue.prevSongs.length > 0)
(song) => song.type == "spotify" return findSimilar(client, queue, queue.prevSongs, guild);
);
if (prevSongs.length >= 0)
return findSimilar(client, queue, prevSongs, guild);
} }
} }
} }
@ -44,8 +41,8 @@ function findSimilar(client, queue, prevSongs, guild) {
let retries = 0; let retries = 0;
const query = const query =
prevSongs[Math.floor(Math.random() * Math.floor(prevSongs.length))]; prevSongs[Math.floor(Math.random() * Math.floor(prevSongs.length))];
if (!query) return; similarSongs.find(
similarSongs.find({ {
title: query.track.name, title: query.track.name,
artist: query.track.artists[0].name, artist: query.track.artists[0].name,
limit: 10, limit: 10,
@ -69,6 +66,7 @@ function findSimilar(client, queue, prevSongs, guild) {
author: {}, author: {},
type: "ytdl", type: "ytdl",
info: songInfo.videoDetails, info: songInfo.videoDetails,
track: query.track,
}); });
client.funcs.play(guild, queue.songs[0], client, 0, true); client.funcs.play(guild, queue.songs[0], client, 0, true);
} else { } else {

View File

@ -24,7 +24,7 @@ module.exports = {
embedColor: "#b50002", embedColor: "#b50002",
invite: "https://musix-web.herokuapp.com/releases", invite: "https://musix-web.herokuapp.com/releases",
supportServer: "https://musix-web.herokuapp.com/discord", supportServer: "https://musix-web.herokuapp.com/discord",
devMode: false, devMode: true,
api: false, api: false,
saveDB: true, saveDB: true,
respawn: true, respawn: true,
@ -40,7 +40,7 @@ module.exports = {
djrole: null, djrole: null,
startPlaying: true, startPlaying: true,
bass: 1, bass: 1,
autoPlay: true, autoPlay: false,
}; };
module.exports.streamConfig = { module.exports.streamConfig = {