Skip to main content

Interface: SnowflakeGenerateOptions

@sapphire/snowflake.SnowflakeGenerateOptions

Options for Snowflake#generate

Properties

increment

Optional increment: bigint

The increment to use

Default

0n

Remark

keep in mind that this bigint is auto-incremented between generate calls

Defined in

lib/Snowflake.ts:233


processId

Optional processId: bigint

The process ID to use, will be truncated to 5 bits (0-31)

Default

1n

Defined in

lib/Snowflake.ts:245


timestamp

Optional timestamp: number | bigint | Date

Timestamp or date of the snowflake to generate

Default

Date.now()

Defined in

lib/Snowflake.ts:226


workerId

Optional workerId: bigint

The worker ID to use, will be truncated to 5 bits (0-31)

Default

0n

Defined in

lib/Snowflake.ts:239