aquelemiguel / parrot

🦜 A hassle-free, highly performant, self-hosted Discord music bot with YouTube and Spotify support. Powered by yt-dlp.
MIT License
136 stars 44 forks source link

Do not fail silently when track is not found #192

Closed aquelemiguel closed 2 years ago

aquelemiguel commented 2 years ago

📝 Description

When searching for a track, sometimes yt-dlp won't return anything (most likely because it could not find the specified query). At the time of writing, the yt-dlp command below doesn't output anything.

yt-dlp -j -f "webm[abr>0]/bestaudio/best" -R "infinite" --no-playlist --ignore-config "ytsearch:asdflfl" -o -

This naturally makes our queueing step fail because there's no data.

image

We should tell the user that their query yielded no results by editing the "searching" interaction.

🪜 Reproduction Steps

  1. Run /play query: asdflfl (this is failing at the time of writing, but is not guaranteed it'll stay this way).
  2. Parrot fails silently - only outputs error in terminal, "searching" message stays

ℹ Environment / Computer Info

📸 Screenshots

No response