From 66303b04ff040aa2f394cc073a1390f7048a1eab Mon Sep 17 00:00:00 2001 From: Roxedus Date: Sun, 14 Jun 2020 15:35:12 +0200 Subject: [PATCH] Fix potential breaking unload. --- cogs/cogs.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cogs/cogs.py b/cogs/cogs.py index 4606381..fd78a2c 100644 --- a/cogs/cogs.py +++ b/cogs/cogs.py @@ -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')