aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Chris <[email protected]>2021-04-19 18:05:11 +0100
committerGravatar Chris <[email protected]>2021-04-19 18:05:11 +0100
commitcb253750a5597d8ca63e8742307bafc096c7e189 (patch)
tree7feb10ff783521bab61b649ac68148ae396a96db
parentMerge pull request #1528 from python-discord/mbaruh/allow_eval (diff)
Require a mod role for stream commands
Previously any staff member (including helpers) could use the stream commands.
-rw-r--r--bot/exts/moderation/stream.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bot/exts/moderation/stream.py b/bot/exts/moderation/stream.py
index 12e195172..7ea7f635b 100644
--- a/bot/exts/moderation/stream.py
+++ b/bot/exts/moderation/stream.py
@@ -8,7 +8,7 @@ from async_rediscache import RedisCache
from discord.ext import commands
from bot.bot import Bot
-from bot.constants import Colours, Emojis, Guild, Roles, STAFF_ROLES, VideoPermission
+from bot.constants import Colours, Emojis, Guild, MODERATION_ROLES, Roles, VideoPermission
from bot.converters import Expiry
from bot.utils.scheduling import Scheduler
from bot.utils.time import format_infraction_with_duration
@@ -69,7 +69,7 @@ class Stream(commands.Cog):
)
@commands.command(aliases=("streaming",))
- @commands.has_any_role(*STAFF_ROLES)
+ @commands.has_any_role(*MODERATION_ROLES)
async def stream(self, ctx: commands.Context, member: discord.Member, duration: Expiry = None) -> None:
"""
Temporarily grant streaming permissions to a member for a given duration.
@@ -126,7 +126,7 @@ class Stream(commands.Cog):
log.debug(f"Successfully gave {member} ({member.id}) permission to stream until {revoke_time}.")
@commands.command(aliases=("pstream",))
- @commands.has_any_role(*STAFF_ROLES)
+ @commands.has_any_role(*MODERATION_ROLES)
async def permanentstream(self, ctx: commands.Context, member: discord.Member) -> None:
"""Permanently grants the given member the permission to stream."""
log.trace(f"Attempting to give permanent streaming permission to {member} ({member.id}).")
@@ -153,7 +153,7 @@ class Stream(commands.Cog):
log.debug(f"Successfully gave {member} ({member.id}) permanent streaming permission.")
@commands.command(aliases=("unstream", "rstream"))
- @commands.has_any_role(*STAFF_ROLES)
+ @commands.has_any_role(*MODERATION_ROLES)
async def revokestream(self, ctx: commands.Context, member: discord.Member) -> None:
"""Revoke the permission to stream from the given member."""
log.trace(f"Attempting to remove streaming permission from {member} ({member.id}).")