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:
parent
ebdeabdc32
commit
024078ccdc
7 changed files with 187 additions and 24 deletions
7
backend/src/utils/snowflakeToTimestamp.ts
Normal file
7
backend/src/utils/snowflakeToTimestamp.ts
Normal 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue