Refactor IsTextChannel and IsVoiceChannel to extensions

This commit is contained in:
Oleksii Holub
2022-06-28 16:38:44 +03:00
parent 5755334492
commit 2c7986c4e6
10 changed files with 26 additions and 19 deletions

View File

@@ -19,7 +19,7 @@ public class GetDirectMessageChannelsCommand : TokenCommandBase
var channels = await Discord.GetGuildChannelsAsync(Guild.DirectMessages.Id, cancellationToken);
var textChannels = channels
.Where(c => c.IsTextChannel)
.Where(c => c.Kind.IsText())
.OrderBy(c => c.Category.Position)
.ThenBy(c => c.Name)
.ToArray();