shardNumber

Returns the shard number a given snowflake is on (given the number of shards), using the algorithm presented at https://discord.com/developers/docs/topics/gateway#sharding.

ushort
shardNumber
(
Snowflake id
,
ushort numShards
)

Parameters

id Snowflake

the Snowflake to find the shard number of

numShards ushort

the number of total shards

Meta