From 21a253103e5099365564379a1757302a7f2a359d Mon Sep 17 00:00:00 2001 From: palmtree5 <3577255+palmtree5@users.noreply.github.com> Date: Thu, 16 May 2019 18:28:26 -0800 Subject: [PATCH] [V3 Streams] fix an issue with stream commands not dealing with reruns (#2679) --- redbot/cogs/streams/streams.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/redbot/cogs/streams/streams.py b/redbot/cogs/streams/streams.py index 9ba5c398e..52c95ef1d 100644 --- a/redbot/cogs/streams/streams.py +++ b/redbot/cogs/streams/streams.py @@ -131,7 +131,7 @@ class Streams(commands.Cog): @staticmethod async def check_online(ctx: commands.Context, stream): try: - embed = await stream.is_online() + info = await stream.is_online() except OfflineStream: await ctx.send(_("That user is offline.")) except StreamNotFound: @@ -155,6 +155,14 @@ class Streams(commands.Cog): _("Something went wrong whilst trying to contact the stream service's API.") ) else: + if isinstance(info, tuple): + embed, is_rerun = info + ignore_reruns = await self.db.guild(channel.guild).ignore_reruns() + if ignore_reruns and is_rerun: + await ctx.send(_("That user is offline.")) + return + else: + embed = info await ctx.send(embed=embed) @commands.group()