From e50caca3c3f8be8cf6ddcc1a0783c8e34e957597 Mon Sep 17 00:00:00 2001 From: aikaterna <20862007+aikaterna@users.noreply.github.com> Date: Tue, 10 Mar 2020 11:43:24 -0700 Subject: [PATCH] [IcyParser] Add a condition --- icyparser/icyparser.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/icyparser/icyparser.py b/icyparser/icyparser.py index 4058e7e..d919a5b 100644 --- a/icyparser/icyparser.py +++ b/icyparser/icyparser.py @@ -56,6 +56,8 @@ class IcyParser(commands.Cog): player = lavalink.get_player(ctx.guild.id) except KeyError: return await ctx.send("The bot is not playing any music.") + if not player.current: + return await ctx.send("The bot is not playing any music.") if not player.current.is_stream: return await ctx.send("The bot is not playing a stream.") icy = await self._icyparser(player.current.uri)