From c41f2c7c9b6535836c421e7dbb6579365fa3b7f8 Mon Sep 17 00:00:00 2001 From: Fennel Date: Fri, 24 Apr 2020 17:22:46 -0400 Subject: [PATCH] Fix Proxied Message Logging --- 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 e3ed92d1..d64c3f46 100644 --- a/PluralKit.Bot/Utils/DiscordUtils.cs +++ b/PluralKit.Bot/Utils/DiscordUtils.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading.Tasks; using DSharpPlus; @@ -57,7 +57,7 @@ namespace PluralKit.Bot (BotPermissions(channel) & permissionSet) == permissionSet; public static Instant SnowflakeToInstant(ulong snowflake) => - 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) => (ulong) (time - Instant.FromUtc(2015, 1, 1, 0, 0, 0)).TotalMilliseconds >> 22;