1
0
mirror of https://github.com/oliverbooth/VPLink synced 2024-11-09 23:05:41 +00:00

fix: don't include ID on null user

This commit is contained in:
Oliver Booth 2023-11-14 21:51:22 +00:00
parent d2613dbdcb
commit e666a94e53
Signed by: oliverbooth
GPG Key ID: E60B570D1B7557B5

View File

@ -65,7 +65,10 @@ internal sealed class DiscordMessageService : BackgroundService, IDiscordMessage
var embed = new EmbedBuilder();
embed.WithColor(0xFF0000);
embed.WithDescription($"📤 **Avatar Left**: {avatar.Name} (User #{avatar.User.Id})");
if (avatar.User is { } user)
embed.WithDescription($"📤 **Avatar Left**: {avatar.Name} (User #{user.Id})");
else
embed.WithDescription($"📤 **Avatar Left**: {avatar.Name}");
return channel.SendMessageAsync(embed: embed.Build());
}