mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-01 20:46:08 +00:00

* fix(Message): delete() params * feat: fetches guilds items * fix(types): literal types * fix
13 lines
286 B
TypeScript
13 lines
286 B
TypeScript
/** snowflake type */
|
|
export type Snowflake = string;
|
|
|
|
/** Discord epoch */
|
|
export const DiscordEpoch = 14200704e5;
|
|
|
|
/** utilities for Snowflakes */
|
|
export const Snowflake = {
|
|
snowflakeToTimestamp(id: Snowflake): number {
|
|
return (Number(id) >> 22) + DiscordEpoch;
|
|
},
|
|
};
|