mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
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:
parent
3ba46ff456
commit
0efaab6d95
11 changed files with 48 additions and 52 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -436,7 +436,7 @@ namespace PluralKit.Bot
|
|||
{
|
||||
ctx.CheckSystem();
|
||||
|
||||
var guild = ctx.MatchGuild() ?? ctx.Guild ??
|
||||
var guild = await ctx.MatchGuild() ?? ctx.Guild ??
|
||||
throw new PKError("You must run this command in a server or pass a server ID.");
|
||||
|
||||
var gs = await _repo.GetSystemGuild(guild.Id, ctx.System.Id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue