Remind crash prevention on too long reminders.

This commit is contained in:
Master Kwoth 2016-04-05 00:25:48 +02:00
parent f85e94482d
commit 9c4da557c7

View File

@ -35,7 +35,8 @@ namespace NadekoBot.Modules.Administration.Commands
? twoMins //if the time is less than 2 minutes, ? twoMins //if the time is less than 2 minutes,
: r.When - now; //it will send the message 2 minutes after start : r.When - now; //it will send the message 2 minutes after start
//To account for high bot startup times //To account for high bot startup times
if (time.TotalMilliseconds > int.MaxValue)
return null;
var t = new Timer(time.TotalMilliseconds); var t = new Timer(time.TotalMilliseconds);
t.Elapsed += async (s, e) => t.Elapsed += async (s, e) =>
{ {