From d576e4d6a307ef28a85b8fd69df396071510b6d9 Mon Sep 17 00:00:00 2001 From: Myned Date: Fri, 20 Oct 2017 16:17:16 -0400 Subject: [PATCH] Compressed add_cog to for loop --- src/main/run.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/run.py b/src/main/run.py index 3bc600f..0ce49f3 100644 --- a/src/main/run.py +++ b/src/main/run.py @@ -28,16 +28,15 @@ def get_prefix(bot, message): bot = commands.Bot(command_prefix=get_prefix, description='Experimental miscellaneous bot') # Send and print ready message to #testing and console after logon + + @bot.event async def on_ready(): from cogs import booru, info, management, owner, tools - bot.add_cog(tools.Utils(bot)) - bot.add_cog(owner.Bot(bot)) - bot.add_cog(owner.Tools(bot)) - bot.add_cog(management.Administration(bot)) - bot.add_cog(info.Info(bot)) - bot.add_cog(booru.MsG(bot)) + for cog in (tools.Utils(bot), owner.Bot(bot), owner.Tools(bot), management.Administration(bot), info.Info(bot), booru.MsG(bot)): + bot.add_cog(cog) + print(f'COG : {type(cog).__name__}') # bot.loop.create_task(u.clear(booru.temp_urls, 30*60))