From 6dc801dda6edec1ee4f8d0172cc7da4c275d240d Mon Sep 17 00:00:00 2001 From: Liam Date: Fri, 5 Jul 2024 22:38:14 +0100 Subject: [PATCH] yes! --- .../features/base/commands/general/LookupUserCommand.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/cc/fascinated/bat/features/base/commands/general/LookupUserCommand.java b/src/main/java/cc/fascinated/bat/features/base/commands/general/LookupUserCommand.java index 6c238bf..651e7c5 100644 --- a/src/main/java/cc/fascinated/bat/features/base/commands/general/LookupUserCommand.java +++ b/src/main/java/cc/fascinated/bat/features/base/commands/general/LookupUserCommand.java @@ -61,11 +61,12 @@ public class LookupUserCommand extends BatCommand { for (User.UserFlag flag : target.getFlags()) { flags.append("`").append(flag.getName()).append("`, "); } + String name = target.getGlobalName() == null ? target.getName() : target.getGlobalName().replaceAll("`", ""); target.retrieveProfile().queue(profile -> event.replyEmbeds(EmbedUtils.genericEmbed() .setDescription(new EmbedDescriptionBuilder("User Lookup") - .appendLine("Name: %s".formatted(target.getGlobalName()), true) - .appendLine("Username: %s".formatted(target.getName()), true) - .appendLine("ID: %s".formatted(target.getId()), true) + .appendLine("Name: `%s`".formatted(name), true) + .appendLine("Username: `%s`".formatted(target.getName()), true) + .appendLine("ID: `%s`".formatted(target.getId()), true) .appendLine("Flags: %s".formatted(flags.toString().isEmpty() ? "None" : flags.substring(0, flags.length() - 2)), true) .appendLine("Joined Discord: ".formatted(target.getTimeCreated().toEpochSecond()), true) .appendLine("Avatar: %s".formatted(target.getAvatar() == null ? "None"