From 4a18b321eaabf65a3c0e6ae90b67274ff46f6ba7 Mon Sep 17 00:00:00 2001 From: Christopher F Date: Sat, 25 Feb 2017 16:31:46 -0500 Subject: [PATCH] Change the minimum allowed message to 13d23h59m Connection/API lag could cause messages right on the edge of 14 weeks to fail on Discord's end when they pass our checks. --- src/Discord.Net.Core/Utils/Preconditions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Discord.Net.Core/Utils/Preconditions.cs b/src/Discord.Net.Core/Utils/Preconditions.cs index c246538d8..5c5cba7e6 100644 --- a/src/Discord.Net.Core/Utils/Preconditions.cs +++ b/src/Discord.Net.Core/Utils/Preconditions.cs @@ -185,7 +185,7 @@ namespace Discord // Bulk Delete public static void NoMessageOlderThanTwoWeeks(ulong[] collection, string name) { - var minimum = DateTimeUtils.ToSnowflake(DateTimeOffset.Now.Subtract(TimeSpan.FromDays(14))); + var minimum = DateTimeUtils.ToSnowflake(DateTimeOffset.Now.Subtract(TimeSpan.FromMilliseconds(1209540000))); for (var i = 0; i < collection.Length; i++) if (collection[i] <= minimum) throw new ArgumentOutOfRangeException(name, "Messages must be younger than two weeks to delete."); }