mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-08 10:22:31 -05:00
Checks for administrator role
This commit is contained in:
@@ -13,7 +13,7 @@ class CustomCommands:
|
||||
self.c_commands = fileIO("data/customcom/commands.json", "load")
|
||||
|
||||
@commands.command(pass_context=True, no_pm=True)
|
||||
@checks.mod_or_permissions(manage_server=True)
|
||||
@checks.mod_or_permissions(administrator=True)
|
||||
async def addcom(self, ctx, command : str, *, text):
|
||||
"""Adds a custom command
|
||||
|
||||
@@ -37,7 +37,7 @@ class CustomCommands:
|
||||
await self.bot.say("This command already exists. Use editcom to edit it.")
|
||||
|
||||
@commands.command(pass_context=True, no_pm=True)
|
||||
@checks.mod_or_permissions(manage_server=True)
|
||||
@checks.mod_or_permissions(administrator=True)
|
||||
async def editcom(self, ctx, command : str, *, text):
|
||||
"""Edits a custom command
|
||||
|
||||
@@ -59,7 +59,7 @@ class CustomCommands:
|
||||
await self.bot.say("There are no custom commands in this server. Use addcom [command] [text]")
|
||||
|
||||
@commands.command(pass_context=True, no_pm=True)
|
||||
@checks.mod_or_permissions(manage_server=True)
|
||||
@checks.mod_or_permissions(administrator=True)
|
||||
async def delcom(self, ctx, command : str):
|
||||
"""Deletes a custom command
|
||||
|
||||
|
||||
Reference in New Issue
Block a user