mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-14 01:30:13 +00:00
lint
This commit is contained in:
parent
c9f91e0c13
commit
923ad100e5
4 changed files with 6 additions and 5 deletions
|
|
@ -139,7 +139,7 @@ namespace Myriad.Cache
|
|||
public Task<Channel?> TryGetDmChannel(ulong userId)
|
||||
{
|
||||
if (!_dmChannels.TryGetValue(userId, out var channelId))
|
||||
return Task.FromResult((Channel?) null);
|
||||
return Task.FromResult((Channel?)null);
|
||||
return TryGetChannel(channelId);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ namespace Myriad.Extensions
|
|||
|
||||
public static async ValueTask<Channel?> GetOrFetchChannel(this IDiscordCache cache, DiscordApiClient rest, ulong channelId)
|
||||
{
|
||||
if (await cache.TryGetChannel(channelId) is {} cacheChannel)
|
||||
if (await cache.TryGetChannel(channelId) is { } cacheChannel)
|
||||
return cacheChannel;
|
||||
|
||||
var restChannel = await rest.GetChannel(channelId);
|
||||
|
|
@ -61,7 +61,7 @@ namespace Myriad.Extensions
|
|||
|
||||
public static async Task<Channel> GetOrCreateDmChannel(this IDiscordCache cache, DiscordApiClient rest, ulong recipientId)
|
||||
{
|
||||
if (await cache.TryGetDmChannel(recipientId) is {} cacheChannel)
|
||||
if (await cache.TryGetDmChannel(recipientId) is { } cacheChannel)
|
||||
return cacheChannel;
|
||||
|
||||
var restChannel = await rest.CreateDm(recipientId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue