mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
[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:
parent
4f808306ba
commit
39ae4a3b58
@ -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")
|
||||||
|
|||||||
@ -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:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user