refactor: don't use 'out' in IDiscordCache methods

this change is required for async cache (.NET doesn't support async ref/out params)
This commit is contained in:
spiral 2021-11-18 13:11:02 -05:00
parent 3ba46ff456
commit 0efaab6d95
No known key found for this signature in database
GPG key ID: A6059F0CA0E1BD31
11 changed files with 48 additions and 52 deletions

View file

@ -110,7 +110,7 @@ namespace PluralKit.Bot
// Resolve all channels from the cache and order by position
var channels = (await Task.WhenAll(blacklist.Blacklist
.Select(id => _cache.GetChannelOrNull(id))))
.Select(id => _cache.TryGetChannel(id))))
.Where(c => c != null)
.OrderBy(c => c.Position)
.ToList();