Skip to content

Commit

Permalink
Fix index error
Browse files Browse the repository at this point in the history
Co-authored-by: Rakkuzan <[email protected]>
  • Loading branch information
ShootGan committed Mar 30, 2024
1 parent 1be6e1d commit 101e427
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/cogs/audio_cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,9 @@ async def __search_tracks(
search_result = await wavelink.Playable.search(safe_url)
else:
search_result = await wavelink.Playable.search(search_phrase)

tracks = search_result[0]

tracks = search_result[0] if search_result else []

if not tracks:
raise YoutubeTrackNotFound

Expand Down

0 comments on commit 101e427

Please sign in to comment.