From 17826246f28db7c990e1c1b6106509172b14d90c Mon Sep 17 00:00:00 2001 From: Ske Date: Fri, 10 Jul 2020 16:47:30 +0200 Subject: [PATCH] Fix fuzzy log cleaning matching all messages. Closes #195. I got the bitshift the wrong way 'round. --- PluralKit.Bot/Utils/DiscordUtils.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PluralKit.Bot/Utils/DiscordUtils.cs b/PluralKit.Bot/Utils/DiscordUtils.cs index 2b9d2959..0ef9a347 100644 --- a/PluralKit.Bot/Utils/DiscordUtils.cs +++ b/PluralKit.Bot/Utils/DiscordUtils.cs @@ -110,10 +110,10 @@ namespace PluralKit.Bot Instant.FromUtc(2015, 1, 1, 0, 0, 0) + Duration.FromMilliseconds(snowflake >> 22); 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) => - (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) {