mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-21 18:27:59 -05:00
[Core] Strip commas in user input for load, reload, unload (#2693)
rstrip commas, closes #2695
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user