From 39ae4a3b58125c93321a464f649f8ec7e6ad2c7c Mon Sep 17 00:00:00 2001 From: maxbooiii <63972751+maxbooiii@users.noreply.github.com> Date: Wed, 5 Aug 2020 18:04:36 -0700 Subject: [PATCH] [Streams] Change hitbox to smashcast. (#4161) * [Streams] Change hitbox to smashcast. as hitbox is now smashcast. * Add files via upload * reee * :thonk: * oof * Add missing new lines at end of file Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> --- redbot/cogs/streams/streams.py | 10 +++++----- redbot/cogs/streams/streamtypes.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/redbot/cogs/streams/streams.py b/redbot/cogs/streams/streams.py index cde398c11..5570afc9e 100644 --- a/redbot/cogs/streams/streams.py +++ b/redbot/cogs/streams/streams.py @@ -226,8 +226,8 @@ class Streams(commands.Cog): await self.check_online(ctx, stream) @commands.command() - async def hitbox(self, ctx: commands.Context, channel_name: str): - """Check if a Hitbox channel is live.""" + async def smashcast(self, ctx: commands.Context, channel_name: str): + """Check if a smashcast channel is live.""" stream = HitboxStream(name=channel_name) await self.check_online(ctx, stream) @@ -305,9 +305,9 @@ class Streams(commands.Cog): """Toggle alerts in this channel for a YouTube stream.""" await self.stream_alert(ctx, YoutubeStream, channel_name_or_id) - @streamalert.command(name="hitbox") - async def hitbox_alert(self, ctx: commands.Context, channel_name: str): - """Toggle alerts in this channel for a Hitbox stream.""" + @streamalert.command(name="smashcast") + async def smashcast_alert(self, ctx: commands.Context, channel_name: str): + """Toggle alerts in this channel for a Smashcast stream.""" await self.stream_alert(ctx, HitboxStream, channel_name) @streamalert.command(name="picarto") diff --git a/redbot/cogs/streams/streamtypes.py b/redbot/cogs/streams/streamtypes.py index 183bbaf74..59db0c4a8 100644 --- a/redbot/cogs/streams/streamtypes.py +++ b/redbot/cogs/streams/streamtypes.py @@ -331,7 +331,7 @@ class HitboxStream(Stream): token_name = None # This streaming services don't currently require an API key async def is_online(self): - url = "https://api.hitbox.tv/media/live/" + self.name + url = "https://api.smashcast.tv/media/live/" + self.name async with aiohttp.ClientSession() as session: async with session.get(url) as r: