diff --git a/Helpers/UserInfoHelpers.cs b/Helpers/UserInfoHelpers.cs index 6fe0aa7..5b4ab65 100644 --- a/Helpers/UserInfoHelpers.cs +++ b/Helpers/UserInfoHelpers.cs @@ -112,9 +112,10 @@ public static Task GenerateUserInfoEmbed(DiscordUser user) var basicUserInfoEmbed = new DiscordEmbedBuilder() .WithThumbnail($"{user.AvatarUrl}") .WithColor(Program.BotColor) - .AddField("ID", $"{user.Id}") - .AddField("Display Name", $"{user.GlobalName}") - .AddField("Account created on", $" ()"); + .AddField("ID", $"{user.Id}"); + // ReSharper disable once ConditionIsAlwaysTrueOrFalse + if (user.GlobalName is not null) basicUserInfoEmbed.AddField("DisplayName", user.GlobalName); + basicUserInfoEmbed.AddField("Account created on", $" ()"); var userBadges = GetBadges(user); if (userBadges != "") basicUserInfoEmbed.AddField("Badges", userBadges);