Skip to content

Commit

Permalink
Give Server Managers perms to logs restrict, setlevel, rolemenu, setr…
Browse files Browse the repository at this point in the history
…ep and automod commands
  • Loading branch information
WitherredAway committed Nov 24, 2024
1 parent 8883cc4 commit b8d86d6
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions cogs/automod.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,14 @@ async def automod_punish(self, ctx, module, *, reason):
await action.execute(ctx)

@commands.hybrid_group()
@checks.is_community_manager()
@checks.is_server_manager()
async def automod(self, ctx):
"""Utilities for automoderation."""

await ctx.send_help(ctx.command)

@automod.group(fallback="list")
@checks.is_community_manager()
@checks.is_server_manager()
async def words(self, ctx):
"""Displays the banned words list.
Expand All @@ -237,7 +237,7 @@ async def words(self, ctx):
await pages.start(ctx)

@words.command()
@checks.is_community_manager()
@checks.is_server_manager()
async def add(self, ctx, words):
"""Adds words to the banned words list.
Expand All @@ -250,7 +250,7 @@ async def add(self, ctx, words):
await ctx.send(f"Added {words_msg} to the banned words list.")

@words.command()
@checks.is_community_manager()
@checks.is_server_manager()
async def remove(self, ctx, words):
"""Removes words from the banned words list.
Expand Down
2 changes: 1 addition & 1 deletion cogs/levels.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ async def xp(self, ctx, *, member: Optional[discord.Member] = commands.Author):

@commands.hybrid_command()
@commands.guild_only()
@checks.is_community_manager()
@checks.is_server_manager()
async def setlevel(self, ctx, member: discord.Member, level: int):
"""Sets a user's level to a given value.
Expand Down
2 changes: 1 addition & 1 deletion cogs/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ async def logs(

@logs.command()
@commands.guild_only()
@checks.is_community_manager()
@checks.is_server_manager()
async def restrict(self, ctx, channel: discord.TextChannel | discord.Thread | discord.VoiceChannel = None):
"""Restricts the logs for a channel to Admins.
Expand Down
14 changes: 7 additions & 7 deletions cogs/reaction_roles.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def __init__(self, bot):

@commands.hybrid_group()
@commands.guild_only()
@checks.is_community_manager()
@checks.is_server_manager()
async def rolemenu(self, ctx):
"""Utilities for reaction role menus."""

Expand All @@ -32,7 +32,7 @@ async def menu_from_payload(self, payload):

@rolemenu.command(name="create")
@commands.guild_only()
@checks.is_community_manager()
@checks.is_server_manager()
async def create(self, ctx, message: discord.Message, *, name):
"""Creates a role menu on a certain message.
Expand All @@ -55,7 +55,7 @@ async def create(self, ctx, message: discord.Message, *, name):

@rolemenu.command(name="list")
@commands.guild_only()
@checks.is_community_manager()
@checks.is_server_manager()
async def list(self, ctx):
"""Lists this server's role menus.
Expand All @@ -67,7 +67,7 @@ async def list(self, ctx):

@rolemenu.command(name="delete")
@commands.guild_only()
@checks.is_community_manager()
@checks.is_server_manager()
async def delete(self, ctx, name):
"""Deletes an existing role menu.
Expand All @@ -82,7 +82,7 @@ async def delete(self, ctx, name):

@rolemenu.command(name="view")
@commands.guild_only()
@checks.is_community_manager()
@checks.is_server_manager()
async def view(self, ctx, name):
"""Shows information about a role menu.
Expand All @@ -109,7 +109,7 @@ async def view(self, ctx, name):

@rolemenu.command(name="add")
@commands.guild_only()
@checks.is_community_manager()
@checks.is_server_manager()
async def add(self, ctx, name, emoji, role: discord.Role):
"""Adds an emoji and role to a role menu.
Expand Down Expand Up @@ -139,7 +139,7 @@ async def add(self, ctx, name, emoji, role: discord.Role):

@rolemenu.command(name="remove")
@commands.guild_only()
@checks.is_community_manager()
@checks.is_server_manager()
async def rolemenu_remove(self, ctx, name, emoji):
"""Removes an emoji and role from a role menu.
Expand Down
2 changes: 1 addition & 1 deletion cogs/reputation.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ async def giverep(self, ctx, *, member: discord.Member):

@commands.hybrid_command()
@commands.guild_only()
@checks.is_community_manager()
@checks.is_server_manager()
async def setrep(self, ctx, member: discord.Member, value: int):
"""Sets a user's reputation to a given value.
Expand Down

0 comments on commit b8d86d6

Please sign in to comment.