.remind is now way prettier when created

This commit is contained in:
Toastie 2025-03-15 11:32:22 +13:00
parent 0a57edfcb3
commit e77f85edc6
Signed by: toastie_t0ast
GPG key ID: 0861BE54AD481DC7
2 changed files with 19 additions and 11 deletions
src/EllieBot
Modules/Utility/Remind
strings/responses

View file

@ -98,10 +98,10 @@ public partial class Utility
return;
var embed = CreateEmbed()
.WithOkColor()
.WithTitle(GetText(guildId is not null
? strs.reminder_server_list
: strs.reminder_list));
.WithOkColor()
.WithTitle(GetText(guildId is not null
? strs.reminder_server_list
: strs.reminder_list));
List<Reminder> rems;
if (guildId is { } gid)
@ -201,13 +201,18 @@ public partial class Utility
message,
ReminderType.User);
var eb = CreateEmbed()
.WithOkColor()
.WithAuthor(ctx.User)
.WithTitle(GetText(strs.reminder_created))
.AddField(GetText(strs.who_where), !isPrivate ? $"<#{targetId}>" : ctx.User.Username, true)
.AddField(GetText(strs.when), TimestampTag.FromDateTime(time, TimestampTagStyles.Relative), true)
.AddField(GetText(strs.date2), TimestampTag.FromDateTime(time, TimestampTagStyles.ShortDateTime), true)
.WithDescription(message);
await Response()
.Confirm($"\u23f0 {GetText(strs.remind2(
Format.Bold(!isPrivate ? $"<#{targetId}>" : ctx.User.Username),
Format.Bold(message),
TimestampTag.FromDateTime(DateTime.UtcNow.Add(ts), TimestampTagStyles.Relative),
TimestampTag.FormatFromDateTime(time, TimestampTagStyles.ShortDateTime)))}")
.SendAsync();
.Embed(eb)
.SendAsync();
return true;
}

View file

@ -621,7 +621,10 @@
"quote_deleted": "Quote #{0} deleted.",
"quote_edited": "Quote Edited",
"region": "Region",
"remind2": "I will remind {0} to {1} {2} ({3})",
"reminder_created": "Reminder Created",
"who_where": "Who / Where",
"when": "When",
"date2": "Date",
"remind_timely": "I will remind you about your timely reward {0}",
"timely_button": "Click the button to claim your timely reward.",
"remind_invalid": "Not a valid remind format. Remind must have a target, timer and a reason. Check the command list.",