diff options
author | Parker <contact@pkrm.dev> | 2024-12-16 04:49:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-16 04:49:24 +0000 |
commit | a0b6a5b43cb64288a7d190ca55a38367d3bcd0d3 (patch) | |
tree | bb01cd5415a9ba8b530482673d7c5b60f7b5eb6a /code/cogs/play.py | |
parent | 2399336f6f0e01d69d535d96518d20845424d071 (diff) | |
parent | 52c922598398556a89dbb3eb6a3156a094647cf0 (diff) |
Merge pull request #11 from PacketParker/dev
Dev
Diffstat (limited to 'code/cogs/play.py')
-rw-r--r-- | code/cogs/play.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/code/cogs/play.py b/code/cogs/play.py index 1756141..2e07486 100644 --- a/code/cogs/play.py +++ b/code/cogs/play.py @@ -63,7 +63,7 @@ class Play(commands.Cog): dzsearch = f"dzsearch:{query}" results = await player.node.get_tracks(dzsearch) # If Deezer returned nothing - if not results.tracks or results.load_type in ( + if not (results and results.tracks) or results.load_type in ( LoadType.EMPTY, LoadType.ERROR, ): @@ -71,7 +71,9 @@ class Play(commands.Cog): ytmsearch = f"ytmsearch:{query}" results = await player.node.get_tracks(ytmsearch) # If YouTube Music returned nothing - if not results.tracks or results.load_type in ( + if not ( + results and results.tracks + ) or results.load_type in ( LoadType.EMPTY, LoadType.ERROR, ): @@ -82,7 +84,7 @@ class Play(commands.Cog): results = await player.node.get_tracks(query) # If there are no results found, set results/embed to None, handled further down - if not results.tracks or results.load_type in ( + if not (results and results.tracks) or results.load_type in ( LoadType.EMPTY, LoadType.ERROR, ): |