From b6811afb34953faa44d98cf90896e12d6253d0f2 Mon Sep 17 00:00:00 2001 From: samvaio Date: Tue, 22 Nov 2016 01:24:53 +0530 Subject: [PATCH] chaned time and days - days to day(s) - months to month(s) etc --- .../Modules/Utility/Commands/Remind.cs | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/NadekoBot/Modules/Utility/Commands/Remind.cs b/src/NadekoBot/Modules/Utility/Commands/Remind.cs index 391e9109..a0e006a7 100644 --- a/src/NadekoBot/Modules/Utility/Commands/Remind.cs +++ b/src/NadekoBot/Modules/Utility/Commands/Remind.cs @@ -151,11 +151,11 @@ namespace NadekoBot.Modules.Utility continue; } else if (value < 1 || - (groupName == "months" && value > 1) || - (groupName == "weeks" && value > 4) || - (groupName == "days" && value >= 7) || - (groupName == "hours" && value > 23) || - (groupName == "minutes" && value > 59)) + (groupName == "month(s)" && value > 1) || + (groupName == "week(s)" && value > 4) || + (groupName == "day(s)" && value >= 7) || + (groupName == "hour(s)" && value > 23) || + (groupName == "minute(s)" && value > 59)) { await channel.SendMessageAsync($"⚠️ Invalid {groupName} value.").ConfigureAwait(false); return; @@ -164,11 +164,11 @@ namespace NadekoBot.Modules.Utility namesAndValues[groupName] = value; output += m.Groups[groupName].Value + " " + groupName + " "; } - var time = DateTime.Now + new TimeSpan(30 * namesAndValues["months"] + - 7 * namesAndValues["weeks"] + - namesAndValues["days"], - namesAndValues["hours"], - namesAndValues["minutes"], + var time = DateTime.Now + new TimeSpan(30 * namesAndValues["month(s)"] + + 7 * namesAndValues["week(s)"] + + namesAndValues["day(s)"], + namesAndValues["hour(s)"], + namesAndValues["minute(s)"], 0); var rem = new Reminder