From dfc19ad641287119e708ea9a2bdf2f95461b73b5 Mon Sep 17 00:00:00 2001 From: mctaylors Date: Wed, 1 Feb 2023 22:38:33 +0300 Subject: [PATCH] Update RemindCommand.cs, ReplyEmojis.cs --- Commands/RemindCommand.cs | 13 +++++++------ ReplyEmojis.cs | 25 +++++++++++++------------ 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/Commands/RemindCommand.cs b/Commands/RemindCommand.cs index 49b8a17..efc9fd2 100644 --- a/Commands/RemindCommand.cs +++ b/Commands/RemindCommand.cs @@ -9,19 +9,20 @@ public sealed class RemindCommand : ICommand { // TODO: actually make this good var remindIn = CommandProcessor.GetTimeSpan(args, 0); var reminderText = cmd.GetRemaining(cleanArgs, 1, "ReminderText"); + var reminderOffset = DateTimeOffset.Now.Add(remindIn); if (reminderText is not null) { GuildData.Get(cmd.Context.Guild).MemberData[cmd.Context.User.Id].Reminders.Add( new Reminder { - RemindAt = DateTimeOffset.Now.Add(remindIn), + RemindAt = reminderOffset, ReminderText = reminderText, ReminderChannel = cmd.Context.Channel.Id }); - var feedback = string.Format(Messages.FeedbackReminderAdded, DateTimeOffset.Now.Add(remindIn).ToUnixTimeSeconds()); - cmd.Reply(feedback, ReplyEmojis.Success); - cmd.Audit(feedback); - } - cmd.ConfigWriteScheduled = true; + cmd.ConfigWriteScheduled = true; + + var feedback = string.Format(Messages.FeedbackReminderAdded, reminderOffset.ToUnixTimeSeconds().ToString()); + cmd.Reply(feedback, ReplyEmojis.Reminder); + } return Task.CompletedTask; } diff --git a/ReplyEmojis.cs b/ReplyEmojis.cs index a4e8c40..3ccb6a6 100644 --- a/ReplyEmojis.cs +++ b/ReplyEmojis.cs @@ -1,18 +1,19 @@ namespace Boyfriend; public static class ReplyEmojis { - public const string Success = ":white_check_mark:"; - public const string Error = ":x:"; + public const string Success = ":white_check_mark:"; + public const string Error = ":x:"; public const string MissingArgument = ":keyboard:"; public const string InvalidArgument = ":construction:"; - public const string NoPermission = ":no_entry_sign:"; - public const string CantInteract = ":vertical_traffic_light:"; - public const string Help = ":page_facing_up:"; - public const string SettingsList = ":gear:"; - public const string SettingsSet = ":control_knobs:"; - public const string Ping = ":signal_strength:"; - public const string Banned = ":hammer:"; - public const string Kicked = ":police_car:"; - public const string Muted = ":mute:"; - public const string Unmuted = ":loud_sound:"; + public const string NoPermission = ":no_entry_sign:"; + public const string CantInteract = ":vertical_traffic_light:"; + public const string Help = ":page_facing_up:"; + public const string SettingsList = ":gear:"; + public const string SettingsSet = ":control_knobs:"; + public const string Ping = ":signal_strength:"; + public const string Banned = ":hammer:"; + public const string Kicked = ":police_car:"; + public const string Muted = ":mute:"; + public const string Unmuted = ":loud_sound:"; + public const string Reminder = ":alarm_clock:"; }