From 7dd3ff7c8dc2d17b774ddeeb3fa73591dd852cb6 Mon Sep 17 00:00:00 2001 From: zephyrkul Date: Thu, 16 May 2019 21:54:17 -0600 Subject: [PATCH] [Core] Strip commas in user input for load, reload, unload (#2693) rstrip commas, closes #2695 --- redbot/core/core_commands.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/redbot/core/core_commands.py b/redbot/core/core_commands.py index 97f1bbcc3..6552bd4ee 100644 --- a/redbot/core/core_commands.py +++ b/redbot/core/core_commands.py @@ -529,6 +529,7 @@ class Core(commands.Cog, CoreLogic): """Loads packages""" if not cogs: return await ctx.send_help() + cogs = tuple(map(lambda cog: cog.rstrip(","), cogs)) async with ctx.typing(): loaded, failed, not_found, already_loaded, failed_with_reason = await self._load(cogs) @@ -571,6 +572,7 @@ class Core(commands.Cog, CoreLogic): """Unloads packages""" if not cogs: return await ctx.send_help() + cogs = tuple(map(lambda cog: cog.rstrip(","), cogs)) unloaded, failed = await self._unload(cogs) if unloaded: @@ -589,6 +591,7 @@ class Core(commands.Cog, CoreLogic): """Reloads packages""" if not cogs: return await ctx.send_help() + cogs = tuple(map(lambda cog: cog.rstrip(","), cogs)) async with ctx.typing(): loaded, failed, not_found, already_loaded, failed_with_reason = await self._reload( cogs