Rework architecture

This commit is contained in:
Alexey Golub
2020-04-21 21:30:42 +03:00
parent 130c0b6fe2
commit 8685a3d7e3
119 changed files with 1520 additions and 1560 deletions

View File

@@ -2,21 +2,16 @@
using System.Threading.Tasks;
using CliFx;
using CliFx.Attributes;
using DiscordChatExporter.Core.Services;
using DiscordChatExporter.Cli.Commands.Base;
namespace DiscordChatExporter.Cli.Commands
{
[Command("dm", Description = "Get the list of direct message channels.")]
public class GetDirectMessageChannelsCommand : TokenCommandBase
{
public GetDirectMessageChannelsCommand(DataService dataService)
: base(dataService)
{
}
public override async ValueTask ExecuteAsync(IConsole console)
{
var directMessageChannels = await DataService.GetDirectMessageChannelsAsync(Token);
var directMessageChannels = await GetDiscordClient().GetDirectMessageChannelsAsync();
var channels = directMessageChannels.OrderBy(c => c.Name).ToArray();
foreach (var channel in channels)