Use mod/admin_or_permissions instead of just mod/admin. (#4109)

* Update modcheck.

* _or_permissions for set nickname & serverprefix
This commit is contained in:
Jamie 2020-07-29 00:38:19 +01:00 committed by GitHub
parent 57247c5d87
commit 260a2d5c78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -273,7 +273,7 @@ class Streams(commands.Cog):
@commands.group() @commands.group()
@commands.guild_only() @commands.guild_only()
@checks.mod() @checks.mod_or_permissions(manage_channels=True)
async def streamalert(self, ctx: commands.Context): async def streamalert(self, ctx: commands.Context):
"""Manage automated stream alerts.""" """Manage automated stream alerts."""
pass pass
@ -419,9 +419,9 @@ class Streams(commands.Cog):
await self.add_or_remove(ctx, stream) await self.add_or_remove(ctx, stream)
@commands.group() @commands.group()
@checks.mod() @checks.mod_or_permissions(manage_channels=True)
async def streamset(self, ctx: commands.Context): async def streamset(self, ctx: commands.Context):
"""Set tokens for accessing streams.""" """Manage stream alert settings."""
pass pass
@streamset.command(name="timer") @streamset.command(name="timer")

View File

@ -1333,7 +1333,7 @@ class Core(commands.Cog, CoreLogic):
await ctx.send(_("Done.")) await ctx.send(_("Done."))
@_set.command(name="nickname") @_set.command(name="nickname")
@checks.admin() @checks.admin_or_permissions(manage_nicknames=True)
@commands.guild_only() @commands.guild_only()
async def _nickname(self, ctx: commands.Context, *, nickname: str = None): async def _nickname(self, ctx: commands.Context, *, nickname: str = None):
"""Sets [botname]'s nickname.""" """Sets [botname]'s nickname."""
@ -1355,7 +1355,7 @@ class Core(commands.Cog, CoreLogic):
await ctx.send(_("Prefix set.")) await ctx.send(_("Prefix set."))
@_set.command(aliases=["serverprefixes"]) @_set.command(aliases=["serverprefixes"])
@checks.admin() @checks.admin_or_permissions(manage_guild=True)
@commands.guild_only() @commands.guild_only()
async def serverprefix(self, ctx: commands.Context, *prefixes: str): async def serverprefix(self, ctx: commands.Context, *prefixes: str):
"""Sets [botname]'s server prefix(es).""" """Sets [botname]'s server prefix(es)."""