Skip to content

Snowflake

Snowflake

Discord specific UUID like object. Generally interchangable with a string contained the same sequence of characters.

timestamp property readonly

The timestamp of the Snowflake.

worker_id property readonly

The worker ID that generated the Snowflake.

process_id property readonly

The process ID of the Snowflake.

increment property readonly

The increment sequence count of the Snowflake.

__init__(self, identifier=None) special

Initialize the Snowflake.

Parameters:

Name Type Description Default
identifier int, str, Snowflake

Identifier to base off of.

None

__str__(self) special

Return string representation.

__repr__(self) special

Return string representation.

__eq__(self, other) special

Determine if other is equivalent to this Snowflake..

__hash__(self) special

Hash.

generate(self)

Generate a fake Snowflake locally.