[IcyParser] Add a condition

This commit is contained in:
aikaterna
2020-03-10 11:43:24 -07:00
committed by GitHub
parent b6822f46f1
commit e50caca3c3

View File

@@ -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)