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:
@@ -19,7 +19,7 @@ namespace Myriad.Extensions
|
||||
|
||||
public static async Task<PermissionSet> PermissionsFor(this IDiscordCache cache, ulong channelId, ulong userId, GuildMemberPartial? member, bool isWebhook = false)
|
||||
{
|
||||
if (!await cache.TryGetChannel(channelId, out var channel))
|
||||
if (!(await cache.TryGetChannel(channelId) is Channel channel))
|
||||
// todo: handle channel not found better
|
||||
return PermissionSet.Dm;
|
||||
|
||||
|
Reference in New Issue
Block a user