From f30697d1a6648b4daf33dfb35bedf5af4fda2fb6 Mon Sep 17 00:00:00 2001 From: Liam Date: Wed, 3 Jul 2024 02:03:26 +0100 Subject: [PATCH] fix null on old avatar in logs --- .../bat/features/logging/listeners/MemberListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/cc/fascinated/bat/features/logging/listeners/MemberListener.java b/src/main/java/cc/fascinated/bat/features/logging/listeners/MemberListener.java index 2000794..5165117 100644 --- a/src/main/java/cc/fascinated/bat/features/logging/listeners/MemberListener.java +++ b/src/main/java/cc/fascinated/bat/features/logging/listeners/MemberListener.java @@ -130,7 +130,7 @@ public class MemberListener implements EventListener { logFeature.sendLog(batGuild, LogType.MEMBER_USERNAME_UPDATE, EmbedUtils.genericEmbed() .setDescription(new EmbedDescriptionBuilder("Member Avatar Updated") .appendLine("Member: %s".formatted(user.getDiscordUser().getAsMention()), true) - .appendLine("Old Avatar: [avatar](%s)".formatted(oldAvatarUrl), true) + .appendLine("Old Avatar: %s".formatted(oldAvatarUrl == null ? "None" : "[avatar](%s)".formatted(oldAvatarUrl)), true) .appendLine("New Avatar: [avatar](%s)".formatted(newAvatarUrl), true) .build()) .build());