From d7916ad24a69b57ef54185d0c1864381e08ca75d Mon Sep 17 00:00:00 2001 From: Liam Date: Wed, 3 Jul 2024 00:41:28 +0100 Subject: [PATCH] oopsie, log after command was ran --- src/main/java/cc/fascinated/bat/service/CommandService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/cc/fascinated/bat/service/CommandService.java b/src/main/java/cc/fascinated/bat/service/CommandService.java index 8d34305..5a0db14 100644 --- a/src/main/java/cc/fascinated/bat/service/CommandService.java +++ b/src/main/java/cc/fascinated/bat/service/CommandService.java @@ -231,10 +231,10 @@ public class CommandService extends ListenerAdapter { } } - log.info("Executing command \"{}\" for user \"{}\" (took: {}ms)", commandName, user.getDiscordUser().getName(), - System.currentTimeMillis() - before); executor.execute(guild, user, ranInsideGuild ? event.getChannel().asTextChannel() : event.getChannel().asPrivateChannel(), event.getMember(), event.getInteraction()); + log.info("Executed command \"{}\" for user \"{}\" (took: {}ms)", commandName, user.getDiscordUser().getName(), + System.currentTimeMillis() - before); } catch (Exception ex) { log.error("An error occurred while executing command \"{}\"", commandName, ex); event.replyEmbeds(EmbedUtils.errorEmbed()