mirror of
https://github.com/musix-org/musix-oss
synced 2024-12-22 18:03:17 +00:00
possible fix
This commit is contained in:
parent
1e760bb730
commit
fe38315c34
@ -113,17 +113,17 @@ async function searchVideos(data, client, msg, voiceChannel) {
|
||||
for (let i = 0; data.body.tracks.items.length > i; i++) {
|
||||
const track = await data.body.tracks.items[i].track;
|
||||
await client.funcs.sleep(250);
|
||||
await search(
|
||||
search(
|
||||
`${track.artists[0].name} ${track.name} audio`,
|
||||
async function (err, res) {
|
||||
if (err) return console.log(err);
|
||||
if (res.videos.length === 0) {
|
||||
await search(
|
||||
search(
|
||||
`${track.artists[0].name} ${track.name} lyrics`,
|
||||
async function (err, res) {
|
||||
if (err) return console.log(err);
|
||||
if (res.videos.length === 0) {
|
||||
await search(
|
||||
search(
|
||||
`${track.artists[0].name} ${track.name}`,
|
||||
async function (err, res) {
|
||||
if (err) return console.log(err);
|
||||
|
@ -15,6 +15,11 @@ module.exports = async function (guild, song, client, seek, play) {
|
||||
|
||||
streamConfig.options.seek = seek;
|
||||
|
||||
if (!song.url) {
|
||||
queue.songs.shift();
|
||||
song = queue.songs[0]
|
||||
}
|
||||
|
||||
let input = song.url;
|
||||
if (song.type === "ytdl") input = ytdl(song.url, streamConfig.ytdlOptions);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user