From 521091b84ad74e43fa6d48a6ec46df5dfb55c6f1 Mon Sep 17 00:00:00 2001 From: scragly <29337040+scragly@users.noreply.github.com> Date: Mon, 19 Nov 2018 02:34:20 +1000 Subject: Fix cog reload ClientException bug (#195) --- bot/cogs/cogs.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/bot/cogs/cogs.py b/bot/cogs/cogs.py index f090984dd..0a33b3de0 100644 --- a/bot/cogs/cogs.py +++ b/bot/cogs/cogs.py @@ -1,7 +1,7 @@ import logging import os -from discord import ClientException, Colour, Embed +from discord import Colour, Embed from discord.ext.commands import Bot, Context, group from bot.constants import ( @@ -77,10 +77,6 @@ class Cogs: if full_cog not in self.bot.extensions: try: self.bot.load_extension(full_cog) - except ClientException: - log.error(f"{ctx.author} requested we load the '{cog}' cog, " - "but that cog doesn't have a 'setup()' function.") - embed.description = f"Invalid cog: {cog}\n\nCog does not have a `setup()` function" except ImportError: log.error(f"{ctx.author} requested we load the '{cog}' cog, " f"but the cog module {full_cog} could not be found!") -- cgit v1.2.3