aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2019-10-09 16:42:48 -0700
committerGravatar MarkKoz <[email protected]>2019-10-09 16:42:48 -0700
commit319cf13c1946715cff5fbadfdaa301e86849547c (patch)
tree9af667827e53c6a26d08f1a0341675951d428853
parentEscape asterisks in extensions docstrings (diff)
Show help when ext load/unload are invoked without arguments
-rw-r--r--bot/cogs/extensions.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/bot/cogs/extensions.py b/bot/cogs/extensions.py
index 3c59ad8c2..bb66e0b8e 100644
--- a/bot/cogs/extensions.py
+++ b/bot/cogs/extensions.py
@@ -73,6 +73,10 @@ class Extensions(commands.Cog):
If '\*' or '\*\*' is given as the name, all unloaded extensions will be loaded.
""" # noqa: W605
+ if not extensions:
+ await ctx.invoke(self.bot.get_command("help"), "extensions load")
+ return
+
if "*" in extensions or "**" in extensions:
extensions = set(EXTENSIONS) - set(self.bot.extensions.keys())
@@ -86,6 +90,10 @@ class Extensions(commands.Cog):
If '\*' or '\*\*' is given as the name, all loaded extensions will be unloaded.
""" # noqa: W605
+ if not extensions:
+ await ctx.invoke(self.bot.get_command("help"), "extensions unload")
+ return
+
blacklisted = "\n".join(UNLOAD_BLACKLIST & set(extensions))
if blacklisted: