From 6df4b5e56ba35a561d7878325b6e58001ce3fc8e Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Mon, 1 Feb 2021 16:54:16 +0100 Subject: [PATCH] :bug: fix Snowflake return bigint instead of string --- src/util/Snowflake.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/Snowflake.ts b/src/util/Snowflake.ts index f329a1d5..9e94bbd9 100644 --- a/src/util/Snowflake.ts +++ b/src/util/Snowflake.ts @@ -10,7 +10,7 @@ * A container for useful snowflake-related methods. */ export class Snowflake { - static readonly EPOCH = 1420070400000n; + static readonly EPOCH = 1420070400000; static INCREMENT = 0n; // max 4095 static processId = 0n; // max 31 static workerId = 0n; // max 31 @@ -87,7 +87,7 @@ export class Snowflake { var worker = Snowflake.workerId << 17n; var process = Snowflake.processId << 12n; var increment = Snowflake.INCREMENT++; - return (time | worker | process | increment).toString(10); + return time | worker | process | increment; } /**