From 37a899f49738c4e259fedb7d44cea62c45ae7ef3 Mon Sep 17 00:00:00 2001 From: NikolajDanger Date: Tue, 6 Apr 2021 16:44:38 +0200 Subject: [PATCH] :bug: Fixed logging bug Fixed the bug where logging a command doesn't log the subcommand group --- utils/eventHandlers.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/utils/eventHandlers.py b/utils/eventHandlers.py index 3da5a90..77a3bed 100644 --- a/utils/eventHandlers.py +++ b/utils/eventHandlers.py @@ -12,8 +12,14 @@ class EventHandler(): subcommand = f" {ctx.subcommand_name} " else: subcommand = " " + + if ctx.subcommand_group is not None: + subcommandGroup = f"{ctx.subcommand_group} " + else: + subcommandGroup = "" + args = " ".join([str(i) for i in ctx.args]) - fullCommand = f"/{ctx.command}{subcommand}{args}" + fullCommand = f"/{ctx.command}{subcommand}{subcommandGroup}{args}" logMessage = f"{ctx.author.display_name} ran {fullCommand}" self.bot.log(logMessage, str(ctx.channel_id), level = 25)