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
11 changed files with 48 additions and 52 deletions

View File

@@ -4,6 +4,7 @@ using System.Threading.Tasks;
using Myriad.Cache;
using Myriad.Extensions;
using Myriad.Gateway;
using Myriad.Types;
using Serilog.Core;
using Serilog.Events;
@@ -39,7 +40,7 @@ namespace PluralKit.Bot
{
props.Add(new("ChannelId", new ScalarValue(channel.Value)));
if (await _cache.TryGetChannel(channel.Value, out _))
if (await _cache.TryGetChannel(channel.Value) != null)
{
var botPermissions = await _bot.PermissionsIn(channel.Value);
props.Add(new("BotPermissions", new ScalarValue(botPermissions)));