mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
[Streams] Fix NameError (#2699)
- fixes #2696 - My fault for just looking at the github diff and seeing the logic fix on this one, without verifying the name validity in surrounding context. (see my review in #2679)
This commit is contained in:
parent
b190e7417e
commit
cdea03792d
@ -128,8 +128,7 @@ class Streams(commands.Cog):
|
|||||||
stream = PicartoStream(name=channel_name)
|
stream = PicartoStream(name=channel_name)
|
||||||
await self.check_online(ctx, stream)
|
await self.check_online(ctx, stream)
|
||||||
|
|
||||||
@staticmethod
|
async def check_online(self, ctx: commands.Context, stream):
|
||||||
async def check_online(ctx: commands.Context, stream):
|
|
||||||
try:
|
try:
|
||||||
info = await stream.is_online()
|
info = await stream.is_online()
|
||||||
except OfflineStream:
|
except OfflineStream:
|
||||||
@ -157,7 +156,7 @@ class Streams(commands.Cog):
|
|||||||
else:
|
else:
|
||||||
if isinstance(info, tuple):
|
if isinstance(info, tuple):
|
||||||
embed, is_rerun = info
|
embed, is_rerun = info
|
||||||
ignore_reruns = await self.db.guild(channel.guild).ignore_reruns()
|
ignore_reruns = await self.db.guild(ctx.channel.guild).ignore_reruns()
|
||||||
if ignore_reruns and is_rerun:
|
if ignore_reruns and is_rerun:
|
||||||
await ctx.send(_("That user is offline."))
|
await ctx.send(_("That user is offline."))
|
||||||
return
|
return
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user