From 260a2d5c78d9e7914fd295d28343fb9c113c3fec Mon Sep 17 00:00:00 2001 From: Jamie <31554168+flaree@users.noreply.github.com> Date: Wed, 29 Jul 2020 00:38:19 +0100 Subject: [PATCH] Use mod/admin_or_permissions instead of just mod/admin. (#4109) * Update modcheck. * _or_permissions for set nickname & serverprefix --- redbot/cogs/streams/streams.py | 6 +++--- redbot/core/core_commands.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/redbot/cogs/streams/streams.py b/redbot/cogs/streams/streams.py index afd2b6656..24bfd142f 100644 --- a/redbot/cogs/streams/streams.py +++ b/redbot/cogs/streams/streams.py @@ -273,7 +273,7 @@ class Streams(commands.Cog): @commands.group() @commands.guild_only() - @checks.mod() + @checks.mod_or_permissions(manage_channels=True) async def streamalert(self, ctx: commands.Context): """Manage automated stream alerts.""" pass @@ -419,9 +419,9 @@ class Streams(commands.Cog): await self.add_or_remove(ctx, stream) @commands.group() - @checks.mod() + @checks.mod_or_permissions(manage_channels=True) async def streamset(self, ctx: commands.Context): - """Set tokens for accessing streams.""" + """Manage stream alert settings.""" pass @streamset.command(name="timer") diff --git a/redbot/core/core_commands.py b/redbot/core/core_commands.py index 0a244c0bd..8878e2c4d 100644 --- a/redbot/core/core_commands.py +++ b/redbot/core/core_commands.py @@ -1333,7 +1333,7 @@ class Core(commands.Cog, CoreLogic): await ctx.send(_("Done.")) @_set.command(name="nickname") - @checks.admin() + @checks.admin_or_permissions(manage_nicknames=True) @commands.guild_only() async def _nickname(self, ctx: commands.Context, *, nickname: str = None): """Sets [botname]'s nickname.""" @@ -1355,7 +1355,7 @@ class Core(commands.Cog, CoreLogic): await ctx.send(_("Prefix set.")) @_set.command(aliases=["serverprefixes"]) - @checks.admin() + @checks.admin_or_permissions(manage_guild=True) @commands.guild_only() async def serverprefix(self, ctx: commands.Context, *prefixes: str): """Sets [botname]'s server prefix(es)."""