From 4d24fac25d77c789fca55133a97c0fec79b4bf2f Mon Sep 17 00:00:00 2001 From: Phxntxm Date: Thu, 4 Aug 2016 13:31:09 -0500 Subject: [PATCH] Stopped the bot from sending a message if there was an owner when loading/unloading a module --- cogs/owner.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cogs/owner.py b/cogs/owner.py index de08e0b..c326698 100644 --- a/cogs/owner.py +++ b/cogs/owner.py @@ -105,10 +105,10 @@ class Owner: module = "cogs.{}".format(module) try: self.bot.load_extension(module) + await self.bot.say("I have just loaded the {} module".format(module)) except Exception as error: fmt = 'An error occurred while processing this request: ```py\n{}: {}\n```' await self.bot.say(fmt.format(type(error).__name__, error)) - await self.bot.say("I have just loaded the {} module".format(module)) @commands.command() @commands.check(checks.isOwner) @@ -119,10 +119,10 @@ class Owner: module = "cogs.{}".format(module) try: self.bot.unload_extension(module) + await self.bot.say("I have just unloaded the {} module".format(module)) except Exception as error: fmt = 'An error occurred while processing this request: ```py\n{}: {}\n```' await self.bot.say(fmt.format(type(error).__name__, error)) - await self.bot.say("I have just unloaded the {} module".format(module)) @commands.command() @commands.check(checks.isOwner) @@ -134,10 +134,10 @@ class Owner: self.bot.unload_extension(module) try: self.bot.load_extension(module) + await self.bot.say("I have just reloaded the {} module".format(module)) except Exception as error: fmt = 'An error occurred while processing this request: ```py\n{}: {}\n```' await self.bot.say(fmt.format(type(error).__name__, error)) - await self.bot.say("I have just reloaded the {} module".format(module)) def setup(bot):