Architecture refactor (#63)

This commit is contained in:
Alexey Golub
2018-06-25 01:59:15 +03:00
committed by GitHub
parent d958f613a3
commit 481991bd00
52 changed files with 1484 additions and 1846 deletions

View File

@@ -38,16 +38,19 @@ namespace DiscordChatExporter.Cli.ViewModels
}
// Get messages
var messages = await _dataService.GetChannelMessagesAsync(token, channelId, from, to);
var messages = await _dataService.GetChannelMessagesAsync(token, channel.Id, from, to);
// Group them
// Group messages
var messageGroups = _messageGroupService.GroupMessages(messages);
// Get mentionables
var mentionables = await _dataService.GetMentionablesAsync(token, guild.Id, messages);
// Create log
var log = new ChannelChatLog(guild, channel, messageGroups, messages.Count);
var log = new ChatLog(guild, channel, messageGroups, mentionables);
// Export
await _exportService.ExportAsync(format, filePath, log);
_exportService.Export(format, filePath, log);
}
}
}