Ignore deleted channels when printing blacklist

This commit is contained in:
Ske 2020-08-28 23:37:27 +02:00
parent 8477cfaf0e
commit 3996cd48c7

View File

@ -85,6 +85,7 @@ namespace PluralKit.Bot
// Resolve all channels from the cache and order by position // Resolve all channels from the cache and order by position
var channels = blacklist.Blacklist var channels = blacklist.Blacklist
.Select(id => ctx.Guild.GetChannel(id)) .Select(id => ctx.Guild.GetChannel(id))
.Where(c => c != null)
.OrderBy(c => c.Position) .OrderBy(c => c.Position)
.ToList(); .ToList();