From 9c4da557c79f9fcccf94011dbc5281e6df9052a9 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Tue, 5 Apr 2016 00:25:48 +0200 Subject: [PATCH] Remind crash prevention on too long reminders. --- NadekoBot/Modules/Administration/Commands/Remind.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NadekoBot/Modules/Administration/Commands/Remind.cs b/NadekoBot/Modules/Administration/Commands/Remind.cs index 1c38edcd..cbbe126d 100644 --- a/NadekoBot/Modules/Administration/Commands/Remind.cs +++ b/NadekoBot/Modules/Administration/Commands/Remind.cs @@ -35,7 +35,8 @@ namespace NadekoBot.Modules.Administration.Commands ? twoMins //if the time is less than 2 minutes, : r.When - now; //it will send the message 2 minutes after start //To account for high bot startup times - + if (time.TotalMilliseconds > int.MaxValue) + return null; var t = new Timer(time.TotalMilliseconds); t.Elapsed += async (s, e) => {