mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 03:38:53 -05:00
Forgot docstrings
This commit is contained in:
parent
399ddeb886
commit
c934dae7cf
@ -287,6 +287,7 @@ class Owner:
|
|||||||
@commands.group(name="command", pass_context=True)
|
@commands.group(name="command", pass_context=True)
|
||||||
@checks.is_owner()
|
@checks.is_owner()
|
||||||
async def command_disabler(self, ctx):
|
async def command_disabler(self, ctx):
|
||||||
|
"""Disables/enables commands"""
|
||||||
if ctx.invoked_subcommand is None:
|
if ctx.invoked_subcommand is None:
|
||||||
await send_cmd_help(ctx)
|
await send_cmd_help(ctx)
|
||||||
if self.disabled_commands:
|
if self.disabled_commands:
|
||||||
@ -298,6 +299,7 @@ class Owner:
|
|||||||
|
|
||||||
@command_disabler.command()
|
@command_disabler.command()
|
||||||
async def disable(self, *, command):
|
async def disable(self, *, command):
|
||||||
|
"""Disable commands/subcommands"""
|
||||||
comm_obj = await self.get_command(command)
|
comm_obj = await self.get_command(command)
|
||||||
if comm_obj is KeyError:
|
if comm_obj is KeyError:
|
||||||
await self.bot.say("That command doesn't seem to exist.")
|
await self.bot.say("That command doesn't seem to exist.")
|
||||||
@ -312,6 +314,7 @@ class Owner:
|
|||||||
|
|
||||||
@command_disabler.command()
|
@command_disabler.command()
|
||||||
async def enable(self, *, command):
|
async def enable(self, *, command):
|
||||||
|
"""Enables commands/subcommands"""
|
||||||
if command in self.disabled_commands:
|
if command in self.disabled_commands:
|
||||||
self.disabled_commands.remove(command)
|
self.disabled_commands.remove(command)
|
||||||
fileIO("data/red/disabled_commands.json", "save", self.disabled_commands)
|
fileIO("data/red/disabled_commands.json", "save", self.disabled_commands)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user