eritislami/evobot

/play [song name] returns "There was an error executing that command." /play [url] still seems to work🐛

Closed this issue · 5 comments

Describe the bug
Attempting to play music by song name no longer works. Returns: "There was an error executing that command."

/play [url to vid] still seems to work however

How To Reproduce
Steps to reproduce the behavior:

  1. /play and song name

Expected behavior
Should play nearest match from youtube

Environment (add if possible)

  • Node.js version: 16.20.2 (latest evobot version)

Additional information & screenshots
Add any other context or screenshots about the problem here.

if u want there is a workaround I use that doesn't require changes to the dependent library:

In structs/Song.ts at line 32:18, replace:

songInfo = await video_basic_info(url);

return new this({
    url: songInfo.video_details.url,
    title: songInfo.video_details.title,
    duration: parseInt(songInfo.video_details.durationInSec)
});

with:

try {
    songInfo = await video_basic_info(url);

    return new this({
        url: songInfo.video_details.url,
        title: songInfo.video_details.title,
        duration: parseInt(songInfo.video_details.durationInSec)
    });
} catch (error) {
    return new this({
        url: url,
        title: error as string,
        duration: -1
    });
}

there is a downside, you wont display any info about the song in the discrod

play-dl just released version 1.9.7 fixing this, hope to see this fixed in Evobot soon!

Edit your package.json file
Go to line 37 "play-dl": "^1.9.6", change it to "play-dl": "^1.9.7",

And run npm install

play-dl just released version 1.9.7 fixing this, hope to see this fixed in Evobot soon!

Edit your package.json file Go to line 37 "play-dl": "^1.9.6", change it to "play-dl": "^1.9.7",

And run npm install

I will update the lock file, but you can just run npm install to get the latest version, nothing else is needed