Browse Source

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.
tags/1.0-rc
Christopher F 8 years ago
parent
commit
4a18b321ea
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/Discord.Net.Core/Utils/Preconditions.cs

+ 1
- 1
src/Discord.Net.Core/Utils/Preconditions.cs View File

@@ -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.");
}


Loading…
Cancel
Save