Skip to content

Commit

Permalink
Add simple trusted check for Veteran Traitor and up
Browse files Browse the repository at this point in the history
  • Loading branch information
Bluenix2 committed Nov 1, 2020
1 parent 034dada commit 2bc539b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cogs/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def __init__(self, bot):
@commands.group(
invoke_without_command=True,
hidden=True)
@checks.mod_only()
@checks.trusted()
async def send(self, ctx, *, text):
"""Send a message as the bot.
The first word can be a channel to send in that channel.
Expand Down
7 changes: 7 additions & 0 deletions cogs/utils/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@


def mod_only():
async def predicate(ctx):
permissions = ctx.author.guild_permissions
return permissions.manage_roles
return commands.check(predicate)


def trusted():
async def predicate(ctx):
permissions = ctx.author.guild_permissions
return permissions.manage_messages
Expand Down

0 comments on commit 2bc539b

Please sign in to comment.