mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 19:28:54 -05:00
[Core] Strip commas in user input for load, reload, unload (#2693)
rstrip commas, closes #2695
This commit is contained in:
parent
21a253103e
commit
7dd3ff7c8d
@ -529,6 +529,7 @@ class Core(commands.Cog, CoreLogic):
|
|||||||
"""Loads packages"""
|
"""Loads packages"""
|
||||||
if not cogs:
|
if not cogs:
|
||||||
return await ctx.send_help()
|
return await ctx.send_help()
|
||||||
|
cogs = tuple(map(lambda cog: cog.rstrip(","), cogs))
|
||||||
async with ctx.typing():
|
async with ctx.typing():
|
||||||
loaded, failed, not_found, already_loaded, failed_with_reason = await self._load(cogs)
|
loaded, failed, not_found, already_loaded, failed_with_reason = await self._load(cogs)
|
||||||
|
|
||||||
@ -571,6 +572,7 @@ class Core(commands.Cog, CoreLogic):
|
|||||||
"""Unloads packages"""
|
"""Unloads packages"""
|
||||||
if not cogs:
|
if not cogs:
|
||||||
return await ctx.send_help()
|
return await ctx.send_help()
|
||||||
|
cogs = tuple(map(lambda cog: cog.rstrip(","), cogs))
|
||||||
unloaded, failed = await self._unload(cogs)
|
unloaded, failed = await self._unload(cogs)
|
||||||
|
|
||||||
if unloaded:
|
if unloaded:
|
||||||
@ -589,6 +591,7 @@ class Core(commands.Cog, CoreLogic):
|
|||||||
"""Reloads packages"""
|
"""Reloads packages"""
|
||||||
if not cogs:
|
if not cogs:
|
||||||
return await ctx.send_help()
|
return await ctx.send_help()
|
||||||
|
cogs = tuple(map(lambda cog: cog.rstrip(","), cogs))
|
||||||
async with ctx.typing():
|
async with ctx.typing():
|
||||||
loaded, failed, not_found, already_loaded, failed_with_reason = await self._reload(
|
loaded, failed, not_found, already_loaded, failed_with_reason = await self._reload(
|
||||||
cogs
|
cogs
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user