fetchRecommendedShardCount
I want to know how this works, since
shard_id = (guild_id >> 22) % num_shards
, hinting that we can't anticipate guildsPerShard
. There's multipleOf
as well, how do these terms link together in a single expression?3 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- ✅
Marked as resolved by staffThe former expression is just Discord's way of assigning guilds to shards
Multiple of just ensures that the number of shards is divisible by that multiple while being greater or equal to the actual recommended shard count
Like if Discord says you should have 12 shards, but you want it to be a multiple of 5, the expression would round up to 15 shards
I'm aware of the first two statements; when might
multipleOf
be of use if not the shard number given by Discord? Also, if additional shards are spawned wouldn't it cost the user more resources than what would actually be in use?
As for guildsPerShard
I guess that 1000
was the per shard limit back then
2) That's nice
1) "concurrency identify limit" means? max_concurrency
field in the session start limit?
Ok thank you