diff --git a/Octobot.csproj b/Octobot.csproj
index 1f050a6..1c2c08c 100644
--- a/Octobot.csproj
+++ b/Octobot.csproj
@@ -29,7 +29,7 @@
-
+
diff --git a/src/Commands/ToolsCommandGroup.cs b/src/Commands/ToolsCommandGroup.cs
index b539355..fb87117 100644
--- a/src/Commands/ToolsCommandGroup.cs
+++ b/src/Commands/ToolsCommandGroup.cs
@@ -101,10 +101,10 @@ public class ToolsCommandGroup : CommandGroup
{
var builder = new StringBuilder().AppendLine($"### <@{target.ID}>");
- if (target.GlobalName is not null)
+ if (target.GlobalName.IsDefined(out var globalName))
{
builder.AppendBulletPointLine(Messages.UserInfoDisplayName)
- .AppendLine(Markdown.InlineCode(target.GlobalName));
+ .AppendLine(Markdown.InlineCode(globalName));
}
builder.AppendBulletPointLine(Messages.UserInfoDiscordUserSince)
diff --git a/src/Services/Update/MemberUpdateService.cs b/src/Services/Update/MemberUpdateService.cs
index 06e531f..7674bbe 100644
--- a/src/Services/Update/MemberUpdateService.cs
+++ b/src/Services/Update/MemberUpdateService.cs
@@ -185,7 +185,7 @@ public sealed partial class MemberUpdateService : BackgroundService
{
var currentNickname = member.Nickname.IsDefined(out var nickname)
? nickname
- : user.GlobalName ?? user.Username;
+ : user.GlobalName.OrDefault(user.Username);
var characterList = currentNickname.ToList();
var usernameChanged = false;
foreach (var character in currentNickname)