From fa1f18e11b1bab71b0ebd611b7f818ce94e1c86e Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 4 Jul 2024 03:42:56 +0100 Subject: [PATCH] don't log every channel find --- src/main/java/cc/fascinated/bat/common/ChannelUtils.java | 4 +++- src/main/java/cc/fascinated/bat/common/UserUtils.java | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/cc/fascinated/bat/common/ChannelUtils.java b/src/main/java/cc/fascinated/bat/common/ChannelUtils.java index 0b3ee77..9e9f2b1 100644 --- a/src/main/java/cc/fascinated/bat/common/ChannelUtils.java +++ b/src/main/java/cc/fascinated/bat/common/ChannelUtils.java @@ -25,7 +25,9 @@ public class ChannelUtils { if (channel == null) { return getTextChannel(id, retries + 1); } - log.info("Found text channel \"{}\" after {} retries.", channel.getName(), retries); + if (retries >= 5) { + log.info("Found text channel \"{}\" after {} retries.", channel.getName(), retries); + } return channel; } diff --git a/src/main/java/cc/fascinated/bat/common/UserUtils.java b/src/main/java/cc/fascinated/bat/common/UserUtils.java index 6cc3ee4..dfba7d6 100644 --- a/src/main/java/cc/fascinated/bat/common/UserUtils.java +++ b/src/main/java/cc/fascinated/bat/common/UserUtils.java @@ -25,7 +25,9 @@ public class UserUtils { if (user == null) { return getUser(id, retries + 1); } - log.info("Found user \"{}\" after {} retries.", user.getGlobalName(), retries); + if (retries >= 5) { + log.info("Found user \"{}\" after {} retries.", user.getGlobalName(), retries); + } return user; }