forked from Fascinated/Bat
maybe fix this?
This commit is contained in:
parent
0e33179260
commit
d01c7d4965
@ -56,18 +56,17 @@ public class LookupUserCommand extends BatCommand {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The flags of the user (example: Discord Partner, Hypesquad Events, etc.)
|
// The flags of the user (eg. Discord Partner, Hypesquad Events, etc.)
|
||||||
StringBuilder flags = new StringBuilder();
|
StringBuilder flags = new StringBuilder();
|
||||||
for (User.UserFlag flag : target.getFlags()) {
|
for (User.UserFlag flag : target.getFlags()) {
|
||||||
flags.append(flag.getName()).append(", ");
|
flags.append("`").append(flag.getName()).append("`, ");
|
||||||
}
|
}
|
||||||
|
|
||||||
target.retrieveProfile().queue(profile -> event.replyEmbeds(EmbedUtils.genericEmbed()
|
target.retrieveProfile().queue(profile -> event.replyEmbeds(EmbedUtils.genericEmbed()
|
||||||
.setDescription(new EmbedDescriptionBuilder("User Lookup")
|
.setDescription(new EmbedDescriptionBuilder("User Lookup")
|
||||||
.appendLine("Name: `%s`".formatted(StringEscapeUtils.escapeJava(target.getGlobalName())), true)
|
.appendLine("Name: %s".formatted(target.getGlobalName()), true)
|
||||||
.appendLine("Username: `%s`".formatted(StringEscapeUtils.escapeJava(target.getName())), true)
|
.appendLine("Username: %s".formatted(target.getName()), true)
|
||||||
.appendLine("ID: `%s`".formatted(target.getId()), true)
|
.appendLine("ID: %s".formatted(target.getId()), true)
|
||||||
.appendLine("Flags: `%s`".formatted(flags.toString().isEmpty() ? "None" : flags.substring(0, flags.length() - 2)), true)
|
.appendLine("Flags: %s".formatted(flags.toString().isEmpty() ? "None" : flags.substring(0, flags.length() - 2)), true)
|
||||||
.appendLine("Joined Discord: <t:%s:R>".formatted(target.getTimeCreated().toEpochSecond()), true)
|
.appendLine("Joined Discord: <t:%s:R>".formatted(target.getTimeCreated().toEpochSecond()), true)
|
||||||
.appendLine("Avatar: %s".formatted(target.getAvatar() == null ? "None"
|
.appendLine("Avatar: %s".formatted(target.getAvatar() == null ? "None"
|
||||||
: "[click here](%s)".formatted(target.getAvatar().getUrl(4096))), true)
|
: "[click here](%s)".formatted(target.getAvatar().getUrl(4096))), true)
|
||||||
|
Loading…
Reference in New Issue
Block a user