[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>
This commit is contained in:
maxbooiii 2020-08-05 18:04:36 -07:00 committed by GitHub
parent 4f808306ba
commit 39ae4a3b58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -226,8 +226,8 @@ class Streams(commands.Cog):
await self.check_online(ctx, stream) await self.check_online(ctx, stream)
@commands.command() @commands.command()
async def hitbox(self, ctx: commands.Context, channel_name: str): async def smashcast(self, ctx: commands.Context, channel_name: str):
"""Check if a Hitbox channel is live.""" """Check if a smashcast channel is live."""
stream = HitboxStream(name=channel_name) stream = HitboxStream(name=channel_name)
await self.check_online(ctx, stream) await self.check_online(ctx, stream)
@ -305,9 +305,9 @@ class Streams(commands.Cog):
"""Toggle alerts in this channel for a YouTube stream.""" """Toggle alerts in this channel for a YouTube stream."""
await self.stream_alert(ctx, YoutubeStream, channel_name_or_id) await self.stream_alert(ctx, YoutubeStream, channel_name_or_id)
@streamalert.command(name="hitbox") @streamalert.command(name="smashcast")
async def hitbox_alert(self, ctx: commands.Context, channel_name: str): async def smashcast_alert(self, ctx: commands.Context, channel_name: str):
"""Toggle alerts in this channel for a Hitbox stream.""" """Toggle alerts in this channel for a Smashcast stream."""
await self.stream_alert(ctx, HitboxStream, channel_name) await self.stream_alert(ctx, HitboxStream, channel_name)
@streamalert.command(name="picarto") @streamalert.command(name="picarto")

View File

@ -331,7 +331,7 @@ class HitboxStream(Stream):
token_name = None # This streaming services don't currently require an API key token_name = None # This streaming services don't currently require an API key
async def is_online(self): 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 aiohttp.ClientSession() as session:
async with session.get(url) as r: async with session.get(url) as r: