mirror of
https://github.com/UiO-Gaming/ShiteMusicBot.git
synced 2026-11-05 13:56:51 +01:00
Fix potential breaking unload.
This commit is contained in:
1 file changed
+2
@@ -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')
|
||||
|
||||
Reference in new issue
Block a user