messages ordered again in .savechat
This commit is contained in:
parent
94f1657a03
commit
50fb532cbf
@ -651,7 +651,7 @@ namespace NadekoBot.Modules.Administration
|
|||||||
}
|
}
|
||||||
var title = $"Chatlog-{channel.Guild.Name}/#{channel.Name}-{DateTime.Now}.txt";
|
var title = $"Chatlog-{channel.Guild.Name}/#{channel.Name}-{DateTime.Now}.txt";
|
||||||
var grouping = msgs.GroupBy(x => $"{x.CreatedAt.Date:dd.MM.yyyy}")
|
var grouping = msgs.GroupBy(x => $"{x.CreatedAt.Date:dd.MM.yyyy}")
|
||||||
.Select(g => new { date = g.Key, messages = g.Select(s => $"【{s.Timestamp:HH:mm:ss}】{s.Author}:" + s.ToString()) });
|
.Select(g => new { date = g.Key, messages = g.OrderBy(x=>x.CreatedAt).Select(s => $"【{s.Timestamp:HH:mm:ss}】{s.Author}:" + s.ToString()) });
|
||||||
await (umsg.Author as IGuildUser).SendFileAsync(
|
await (umsg.Author as IGuildUser).SendFileAsync(
|
||||||
await JsonConvert.SerializeObject(grouping, Formatting.Indented).ToStream().ConfigureAwait(false),
|
await JsonConvert.SerializeObject(grouping, Formatting.Indented).ToStream().ConfigureAwait(false),
|
||||||
title, title).ConfigureAwait(false);
|
title, title).ConfigureAwait(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user