mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
Use mod/admin_or_permissions instead of just mod/admin. (#4109)
* Update modcheck. * _or_permissions for set nickname & serverprefix
This commit is contained in:
parent
57247c5d87
commit
260a2d5c78
@ -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")
|
||||||
|
|||||||
@ -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)."""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user