[Streams] Add guild only decorator to streams commands (#5035)

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
Jamie 2021-05-19 10:58:50 +01:00 committed by GitHub
parent ea82119605
commit c83eae931b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -202,6 +202,7 @@ class Streams(commands.Cog):
if self.ttv_bearer_cache["expires_at"] - datetime.now().timestamp() <= 60: if self.ttv_bearer_cache["expires_at"] - datetime.now().timestamp() <= 60:
await self.get_twitch_bearer_token() await self.get_twitch_bearer_token()
@commands.guild_only()
@commands.command() @commands.command()
async def twitchstream(self, ctx: commands.Context, channel_name: str): async def twitchstream(self, ctx: commands.Context, channel_name: str):
"""Check if a Twitch channel is live.""" """Check if a Twitch channel is live."""
@ -215,6 +216,7 @@ class Streams(commands.Cog):
) )
await self.check_online(ctx, stream) await self.check_online(ctx, stream)
@commands.guild_only()
@commands.command() @commands.command()
@commands.cooldown(1, 30, commands.BucketType.guild) @commands.cooldown(1, 30, commands.BucketType.guild)
async def youtubestream(self, ctx: commands.Context, channel_id_or_name: str): async def youtubestream(self, ctx: commands.Context, channel_id_or_name: str):
@ -233,6 +235,7 @@ class Streams(commands.Cog):
) )
await self.check_online(ctx, stream) await self.check_online(ctx, stream)
@commands.guild_only()
@commands.command() @commands.command()
async def picarto(self, ctx: commands.Context, channel_name: str): async def picarto(self, ctx: commands.Context, channel_name: str):
"""Check if a Picarto channel is live.""" """Check if a Picarto channel is live."""