#fetchRecommendedShardCount

10 messages · Page 1 of 1 (latest)

hidden snow
#

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?

full ermineBOT
#
  • What's your exact discord.js npm list discord.js and node node -v version?
  • Not a discord.js issue? Check out #1081585952654360687.
  • 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 staff
royal moth
#

The 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

hidden snow
#

As for guildsPerShard I guess that 1000 was the per shard limit back then

agile saffron
hidden snow
agile saffron
#

Yes