1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-04-19 16:33:36 +03:00

Fix build errors

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
Octol1ttle 2024-02-06 17:07:10 +05:00
parent 48cd28f08e
commit 0344fbd757
Signed by: Octol1ttle
GPG key ID: B77C34313AEE1FFF
2 changed files with 3 additions and 3 deletions

View file

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

View file

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