mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
Fix a few more compiler warnings
Signed-off-by: Ske <voltasalt@gmail.com>
This commit is contained in:
parent
dd2c669cd2
commit
dbde8c07ad
6 changed files with 18 additions and 12 deletions
|
|
@ -155,19 +155,19 @@ namespace PluralKit.Bot
|
|||
return $"Group not found. Note that a group ID is 5 characters long.";
|
||||
}
|
||||
|
||||
public static async Task<Channel> MatchChannel(this Context ctx)
|
||||
public static Task<Channel> MatchChannel(this Context ctx)
|
||||
{
|
||||
if (!MentionUtils.TryParseChannel(ctx.PeekArgument(), out var id))
|
||||
return null;
|
||||
return Task.FromResult<Channel>(null);
|
||||
|
||||
if (!ctx.Cache.TryGetChannel(id, out var channel))
|
||||
return null;
|
||||
return Task.FromResult<Channel>(null);
|
||||
|
||||
if (!(channel.Type == Channel.ChannelType.GuildText || channel.Type == Channel.ChannelType.GuildText))
|
||||
return null;
|
||||
if (!(channel.Type == Channel.ChannelType.GuildText || channel.Type == Channel.ChannelType.GuildNews))
|
||||
return Task.FromResult<Channel>(null);
|
||||
|
||||
ctx.PopArgument();
|
||||
return channel;
|
||||
return Task.FromResult(channel);
|
||||
}
|
||||
|
||||
public static Guild MatchGuild(this Context ctx)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue