Fix potential breaking unload.

This commit is contained in:
Roxedus committed 2020-06-14 15:35:12 +02:00
1 parent 6353dbd463
commit 66303b04ff
1 file changed
+2
+2
View File
@@ -30,6 +30,8 @@ class Cogs(commands.Cog):
@commands.is_owner()
async def unload(self, ctx, *, module):
"""Unloads a module."""
if module == "cogs":
return await ctx.send('Unloading this cog is not allowed')
try:
self.bot.unload_extension(f'cogs.{module}')
await ctx.send(f'{module} unloaded')