Fix error showing system card with deleted linked account

This commit is contained in:
Ske 2019-07-15 00:05:19 +02:00
parent 382f533dda
commit 0a8aeebb23

View File

@ -27,7 +27,7 @@ namespace PluralKit.Bot {
var accounts = await _systems.GetLinkedAccountIds(system); var accounts = await _systems.GetLinkedAccountIds(system);
// Fetch/render info for all accounts simultaneously // Fetch/render info for all accounts simultaneously
var users = await Task.WhenAll(accounts.Select(async uid => (await _client.GetUserAsync(uid)).NameAndMention() ?? $"(deleted account {uid})")); var users = await Task.WhenAll(accounts.Select(async uid => (await _client.GetUserAsync(uid))?.NameAndMention() ?? $"(deleted account {uid})"));
var eb = new EmbedBuilder() var eb = new EmbedBuilder()
.WithColor(Color.Blue) .WithColor(Color.Blue)