diff --git a/AnimeListBot/Modules/Profile.cs b/AnimeListBot/Modules/Profile.cs index 259129c..f7358fe 100644 --- a/AnimeListBot/Modules/Profile.cs +++ b/AnimeListBot/Modules/Profile.cs @@ -416,6 +416,7 @@ public async Task Leaderboard(int page = 1) animeBoardField.Value += "\n"; } IUser leadDiscordUser = Program._client.GetUser(animeLeadUser.UserId); + if(leadDiscordUser == null) continue; animeBoardField.Value += "#" + (i + 1) + ": " + Format.Sanitize(animeLeadUser.GetAnimelistUsername()) + " (<@" + leadDiscordUser.Id + ">) - " + animeLeadUser.GetAnimeWatchDays() + " days"; } @@ -447,6 +448,7 @@ public async Task Leaderboard(int page = 1) } IUser leadDiscordUser = Program._client.GetUser(mangaLeadUser.UserId); + if(leadDiscordUser == null) continue; mangaBoardField.Value += "#" + (i + 1) + ": " + Format.Sanitize(mangaLeadUser.GetAnimelistUsername()) + " (<@" + leadDiscordUser.Id + ">) - " + mangaLeadUser.GetMangaReadDays() + " days"; }