Skip to content

Commit 260a2d5

Browse files
authored
Use mod/admin_or_permissions instead of just mod/admin. (Cog-Creators#4109)
* Update modcheck. * _or_permissions for set nickname & serverprefix
1 parent 57247c5 commit 260a2d5

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

redbot/cogs/streams/streams.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ async def check_online(
273273

274274
@commands.group()
275275
@commands.guild_only()
276-
@checks.mod()
276+
@checks.mod_or_permissions(manage_channels=True)
277277
async def streamalert(self, ctx: commands.Context):
278278
"""Manage automated stream alerts."""
279279
pass
@@ -419,9 +419,9 @@ async def stream_alert(self, ctx: commands.Context, _class, channel_name):
419419
await self.add_or_remove(ctx, stream)
420420

421421
@commands.group()
422-
@checks.mod()
422+
@checks.mod_or_permissions(manage_channels=True)
423423
async def streamset(self, ctx: commands.Context):
424-
"""Set tokens for accessing streams."""
424+
"""Manage stream alert settings."""
425425
pass
426426

427427
@streamset.command(name="timer")

redbot/core/core_commands.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,7 +1333,7 @@ async def _username(self, ctx: commands.Context, *, username: str):
13331333
await ctx.send(_("Done."))
13341334

13351335
@_set.command(name="nickname")
1336-
@checks.admin()
1336+
@checks.admin_or_permissions(manage_nicknames=True)
13371337
@commands.guild_only()
13381338
async def _nickname(self, ctx: commands.Context, *, nickname: str = None):
13391339
"""Sets [botname]'s nickname."""
@@ -1355,7 +1355,7 @@ async def prefix(self, ctx: commands.Context, *prefixes: str):
13551355
await ctx.send(_("Prefix set."))
13561356

13571357
@_set.command(aliases=["serverprefixes"])
1358-
@checks.admin()
1358+
@checks.admin_or_permissions(manage_guild=True)
13591359
@commands.guild_only()
13601360
async def serverprefix(self, ctx: commands.Context, *prefixes: str):
13611361
"""Sets [botname]'s server prefix(es)."""

0 commit comments

Comments
 (0)