mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 11:48:55 -05:00
[Streams] Add guild only decorator to streams commands (#5035)
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
parent
ea82119605
commit
c83eae931b
@ -202,6 +202,7 @@ class Streams(commands.Cog):
|
||||
if self.ttv_bearer_cache["expires_at"] - datetime.now().timestamp() <= 60:
|
||||
await self.get_twitch_bearer_token()
|
||||
|
||||
@commands.guild_only()
|
||||
@commands.command()
|
||||
async def twitchstream(self, ctx: commands.Context, channel_name: str):
|
||||
"""Check if a Twitch channel is live."""
|
||||
@ -215,6 +216,7 @@ class Streams(commands.Cog):
|
||||
)
|
||||
await self.check_online(ctx, stream)
|
||||
|
||||
@commands.guild_only()
|
||||
@commands.command()
|
||||
@commands.cooldown(1, 30, commands.BucketType.guild)
|
||||
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)
|
||||
|
||||
@commands.guild_only()
|
||||
@commands.command()
|
||||
async def picarto(self, ctx: commands.Context, channel_name: str):
|
||||
"""Check if a Picarto channel is live."""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user