Possible fix for a broken timestamp tag in remind list

This commit is contained in:
Toastie (DCS Team) 2024-08-05 14:04:18 +12:00
parent 500cb95208
commit 3f7e5d5054
Signed by: toastie_t0ast
GPG key ID: 27F3B6855AFD40A4

View file

@ -95,8 +95,8 @@ public partial class Utility
return; return;
var embed = _sender.CreateEmbed() var embed = _sender.CreateEmbed()
.WithOkColor() .WithOkColor()
.WithTitle(GetText(isServer ? strs.reminder_server_list : strs.reminder_list)); .WithTitle(GetText(isServer ? strs.reminder_server_list : strs.reminder_list));
List<Reminder> rems; List<Reminder> rems;
await using (var uow = _db.GetDbContext()) await using (var uow = _db.GetDbContext())
@ -114,10 +114,9 @@ public partial class Utility
{ {
var when = rem.When; var when = rem.When;
embed.AddField( embed.AddField(
$"#{++i + (page * 10)} {rem.When:HH:mm yyyy-MM-dd} UTC " $"#{++i + (page * 10)}",
+ $"{TimestampTag.FromDateTime(when)}", $@"`When:` {TimestampTag.FromDateTime(when, TimestampTagStyles.ShortDateTime)}
$@"`Target:` {(rem.IsPrivate ? "DM" : "Channel")} `Target:` {(rem.IsPrivate ? "DM" : "Channel")} [`{rem.ChannelId}`]
`TargetId:` {rem.ChannelId}
`Message:` {rem.Message?.TrimTo(50)}"); `Message:` {rem.Message?.TrimTo(50)}");
} }
} }