fix null on old avatar in logs

This commit is contained in:
Lee 2024-07-03 02:03:26 +01:00
parent 83250d2c08
commit f30697d1a6

@ -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());