mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-02-23 01:34:42 +00:00
More refactoring
This commit is contained in:
@@ -3,6 +3,8 @@ using System.Threading.Tasks;
|
||||
using CliFx;
|
||||
using CliFx.Attributes;
|
||||
using DiscordChatExporter.Cli.Commands.Base;
|
||||
using DiscordChatExporter.Domain.Discord.Models;
|
||||
using DiscordChatExporter.Domain.Utilities;
|
||||
|
||||
namespace DiscordChatExporter.Cli.Commands
|
||||
{
|
||||
@@ -11,10 +13,9 @@ namespace DiscordChatExporter.Cli.Commands
|
||||
{
|
||||
public override async ValueTask ExecuteAsync(IConsole console)
|
||||
{
|
||||
var directMessageChannels = await GetDiscordClient().GetDirectMessageChannelsAsync();
|
||||
var channels = directMessageChannels.OrderBy(c => c.Name).ToArray();
|
||||
var dmChannels = await GetDiscordClient().GetGuildChannelsAsync(Guild.DirectMessages.Id);
|
||||
|
||||
foreach (var channel in channels)
|
||||
foreach (var channel in dmChannels.OrderBy(c => c.Name))
|
||||
console.Output.WriteLine($"{channel.Id} | {channel.Name}");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user