mirror of
https://github.com/musix-org/musix-oss
synced 2024-12-23 00:23:17 +00:00
Patch
This commit is contained in:
parent
5f6c50fb9a
commit
8e485cc5c0
@ -44,6 +44,7 @@ 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,
|
||||||
@ -53,7 +54,6 @@ function findSimilar(client, queue, prevSongs, guild) {
|
|||||||
youtubeAPIKey: client.config.api_key,
|
youtubeAPIKey: client.config.api_key,
|
||||||
},
|
},
|
||||||
async function (err, songs) {
|
async function (err, songs) {
|
||||||
console.log(songs)
|
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log(err.message);
|
console.log(err.message);
|
||||||
return queue.textChannel.send(client.messages.error);
|
return queue.textChannel.send(client.messages.error);
|
||||||
|
Loading…
Reference in New Issue
Block a user