pull/17/head
Alexey Golub 7 years ago
parent b280f8b736
commit e5e9d4c9ff

@ -26,12 +26,16 @@ namespace DiscordChatExporter.Services
using (var writer = new StreamWriter(filePath, false, Encoding.UTF8, 128 * 1024)) using (var writer = new StreamWriter(filePath, false, Encoding.UTF8, 128 * 1024))
{ {
// Generation info
await writer.WriteLineAsync("https://github.com/Tyrrrz/DiscordChatExporter");
await writer.WriteLineAsync();
// Guild and channel info // Guild and channel info
await writer.WriteLineAsync("=".Repeat(16)); await writer.WriteLineAsync('='.Repeat(48));
await writer.WriteLineAsync($"Guild: {log.Guild}"); await writer.WriteLineAsync($"Guild: {log.Guild}");
await writer.WriteLineAsync($"Channel: {log.Channel}"); await writer.WriteLineAsync($"Channel: {log.Channel}");
await writer.WriteLineAsync($"Messages: {log.TotalMessageCount:N0}"); await writer.WriteLineAsync($"Messages: {log.TotalMessageCount:N0}");
await writer.WriteLineAsync("=".Repeat(16)); await writer.WriteLineAsync('='.Repeat(48));
await writer.WriteLineAsync(); await writer.WriteLineAsync();
// Chat log // Chat log
@ -43,6 +47,7 @@ namespace DiscordChatExporter.Services
// Messages // Messages
foreach (var message in group.Messages) foreach (var message in group.Messages)
{ {
// Content
if (message.Content.IsNotBlank()) if (message.Content.IsNotBlank())
{ {
var contentFormatted = message.Content.Replace("\n", Environment.NewLine); var contentFormatted = message.Content.Replace("\n", Environment.NewLine);

Loading…
Cancel
Save