Class: SnowflakeUtil

SnowflakeUtil

A container for useful snowflake-related methods.

Constructor

new SnowflakeUtil()

Source:

Methods

(static) deconstruct(snowflake) → {DeconstructedSnowflake}

Deconstructs a Discord snowflake.
Parameters:
Name Type Description
snowflake Snowflake Snowflake to deconstruct
Source:
Returns:
Deconstructed snowflake
Type
DeconstructedSnowflake

(static) generate(timestampopt) → {Snowflake}

Generates a Discord snowflake. This hardcodes the worker ID as 1 and the process ID as 0.
Parameters:
Name Type Attributes Default Description
timestamp number | Date <optional>
Date.now() Timestamp or date of the snowflake to generate
Source:
Returns:
The generated snowflake
Type
Snowflake