mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
Fix reload error handling (#1104)
This commit is contained in:
parent
7322f0c676
commit
89981f46b0
@ -80,8 +80,9 @@ class Core:
|
|||||||
"""Reloads a package"""
|
"""Reloads a package"""
|
||||||
ctx.bot.unload_extension(cog_name)
|
ctx.bot.unload_extension(cog_name)
|
||||||
|
|
||||||
spec = await ctx.bot.cog_mgr.find_cog(cog_name)
|
try:
|
||||||
if spec is None:
|
spec = await ctx.bot.cog_mgr.find_cog(cog_name)
|
||||||
|
except RuntimeError:
|
||||||
await ctx.send(_("No module by that name was found in any"
|
await ctx.send(_("No module by that name was found in any"
|
||||||
" cog path."))
|
" cog path."))
|
||||||
return
|
return
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user