mirror of
https://github.com/oliverbooth/VPLink
synced 2024-11-10 03:35:42 +00:00
fix: don't include ID on null user
This commit is contained in:
parent
d2613dbdcb
commit
e666a94e53
@ -65,7 +65,10 @@ internal sealed class DiscordMessageService : BackgroundService, IDiscordMessage
|
|||||||
|
|
||||||
var embed = new EmbedBuilder();
|
var embed = new EmbedBuilder();
|
||||||
embed.WithColor(0xFF0000);
|
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());
|
return channel.SendMessageAsync(embed: embed.Build());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user