mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-08 12:18:54 -05:00
[V3 Streams] fix an issue with stream commands not dealing with reruns (#2679)
This commit is contained in:
parent
db3fb29b30
commit
21a253103e
@ -131,7 +131,7 @@ class Streams(commands.Cog):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
async def check_online(ctx: commands.Context, stream):
|
async def check_online(ctx: commands.Context, stream):
|
||||||
try:
|
try:
|
||||||
embed = await stream.is_online()
|
info = await stream.is_online()
|
||||||
except OfflineStream:
|
except OfflineStream:
|
||||||
await ctx.send(_("That user is offline."))
|
await ctx.send(_("That user is offline."))
|
||||||
except StreamNotFound:
|
except StreamNotFound:
|
||||||
@ -155,6 +155,14 @@ class Streams(commands.Cog):
|
|||||||
_("Something went wrong whilst trying to contact the stream service's API.")
|
_("Something went wrong whilst trying to contact the stream service's API.")
|
||||||
)
|
)
|
||||||
else:
|
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)
|
await ctx.send(embed=embed)
|
||||||
|
|
||||||
@commands.group()
|
@commands.group()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user