mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-14 01:30:13 +00:00
Fix Proxied Message Logging
This commit is contained in:
parent
bdb6019cb9
commit
c41f2c7c9b
1 changed files with 2 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
using DSharpPlus;
|
using DSharpPlus;
|
||||||
|
|
@ -57,7 +57,7 @@ namespace PluralKit.Bot
|
||||||
(BotPermissions(channel) & permissionSet) == permissionSet;
|
(BotPermissions(channel) & permissionSet) == permissionSet;
|
||||||
|
|
||||||
public static Instant SnowflakeToInstant(ulong snowflake) =>
|
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) =>
|
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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue