From c5c890f87642ebc822f77912ddf924adaaf11d90 Mon Sep 17 00:00:00 2001 From: Dustin Pianalto Date: Sat, 14 Dec 2019 01:17:21 -0900 Subject: [PATCH] Add logging to load and unload commands --- geeksbot/__main__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/geeksbot/__main__.py b/geeksbot/__main__.py index c046b55..2affa63 100644 --- a/geeksbot/__main__.py +++ b/geeksbot/__main__.py @@ -130,8 +130,10 @@ bot = Geeksbot(case_insensitive=True) @commands.is_owner() async def load(ctx, mod=None): """Allows the owner to load extensions dynamically""" + logger.info(f"Starting to load {mod}") await bot.load_ext(mod) await ctx.send(f'{mod} loaded') + logger.info(f"{mod} loaded") @bot.command(hidden=True) @@ -154,8 +156,10 @@ async def reload(ctx, mod=None): @commands.is_owner() async def unload(ctx, mod): """Allows the owner to unload extensions dynamically""" + logger.info(f"Starting to unload {mod}") await bot.unload_ext(mod) await ctx.send(f'{mod} unloaded') + logger.info(f"{mod} unloaded") @bot.event