3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 12:25:02 +00:00

Add !invite utility command

This commit is contained in:
Dragory 2020-08-05 18:52:15 +03:00
parent ebdeabdc32
commit 024078ccdc
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
7 changed files with 187 additions and 24 deletions

View file

@ -0,0 +1,7 @@
/**
* @return Unix timestamp in milliseconds
*/
export function snowflakeToTimestamp(snowflake: string) {
// https://discord.com/developers/docs/reference#snowflakes-snowflake-id-format-structure-left-to-right
return Number(BigInt(snowflake) >> 22n) + 1420070400000;
}