mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-10 07:47:53 +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
|
|
@ -93,7 +93,7 @@ namespace PluralKit.Bot
|
|||
private async Task<Channel?> FindLogChannel(ulong guildId, ulong channelId)
|
||||
{
|
||||
// TODO: fetch it directly on cache miss?
|
||||
if (await _cache.TryGetChannel(channelId, out var channel))
|
||||
if (await _cache.TryGetChannel(channelId) is Channel channel)
|
||||
return channel;
|
||||
|
||||
// Channel doesn't exist or we don't have permission to access it, let's remove it from the database too
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue