From f2ebf52f6edabf432ed9ab8f82fede9acb713ecb Mon Sep 17 00:00:00 2001 From: zephyrkul Date: Sun, 3 Feb 2019 23:39:03 -0700 Subject: [PATCH] Send help on empty [p]load/unload/reload (#2410) Rather than attempting to load / reload / unload nothing, send command help on bare `[p]load`, etc. commands. --- redbot/core/core_commands.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/redbot/core/core_commands.py b/redbot/core/core_commands.py index 775a07b03..9f5310001 100644 --- a/redbot/core/core_commands.py +++ b/redbot/core/core_commands.py @@ -529,6 +529,8 @@ class Core(commands.Cog, CoreLogic): @checks.is_owner() async def load(self, ctx: commands.Context, *cogs: str): """Loads packages""" + if not cogs: + return await ctx.send_help() async with ctx.typing(): loaded, failed, not_found, already_loaded, failed_with_reason = await self._load(cogs) @@ -569,6 +571,8 @@ class Core(commands.Cog, CoreLogic): @checks.is_owner() async def unload(self, ctx: commands.Context, *cogs: str): """Unloads packages""" + if not cogs: + return await ctx.send_help() unloaded, failed = await self._unload(cogs) if unloaded: @@ -585,6 +589,8 @@ class Core(commands.Cog, CoreLogic): @checks.is_owner() async def reload(self, ctx: commands.Context, *cogs: str): """Reloads packages""" + if not cogs: + return await ctx.send_help() async with ctx.typing(): loaded, failed, not_found, already_loaded, failed_with_reason = await self._reload( cogs