Fix fuzzy log cleaning matching all messages. Closes #195.

I got the bitshift the wrong way 'round.
This commit is contained in:
Ske 2020-07-10 16:47:30 +02:00
parent ba48f22ad2
commit 17826246f2

View File

@ -110,10 +110,10 @@ namespace PluralKit.Bot
Instant.FromUtc(2015, 1, 1, 0, 0, 0) + Duration.FromMilliseconds(snowflake >> 22); Instant.FromUtc(2015, 1, 1, 0, 0, 0) + Duration.FromMilliseconds(snowflake >> 22);
public static ulong InstantToSnowflake(Instant time) => public static ulong InstantToSnowflake(Instant time) =>
(ulong) (time - Instant.FromUtc(2015, 1, 1, 0, 0, 0)).TotalMilliseconds >> 22; (ulong) (time - Instant.FromUtc(2015, 1, 1, 0, 0, 0)).TotalMilliseconds << 22;
public static ulong InstantToSnowflake(DateTimeOffset time) => public static ulong InstantToSnowflake(DateTimeOffset time) =>
(ulong) (time - new DateTimeOffset(2015, 1, 1, 0, 0, 0, TimeSpan.Zero)).TotalMilliseconds >> 22; (ulong) (time - new DateTimeOffset(2015, 1, 1, 0, 0, 0, TimeSpan.Zero)).TotalMilliseconds << 22;
public static async Task CreateReactionsBulk(this DiscordMessage msg, string[] reactions) public static async Task CreateReactionsBulk(this DiscordMessage msg, string[] reactions)
{ {