-
-
Notifications
You must be signed in to change notification settings - Fork 737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: Expose Shards
property from GetBotGatewayResponse
object in some way.
#961
Comments
When your bot is under 100,000 guilds, you have some flexibility with shard counts. 2,500 guilds/shard is the enforced limit by Discord, but this is higher than you'll see almost anyone do - realistically 1,000-1,800 guilds per shard is what I've seen. You can calculate this by just taking the total guilds your bot has or theoretically will, finding a good guild/shard number and dividing. If you mean which guild will go to what shard, as messages (DMs) are sent to shard 0 only, the formula:
will give you the |
@shikhir-arora no, Discord provides an endpoint to calculate the recommended number of shards for you - he's just asking us to expose that endpoint in the library. |
I guess I did it wrong is just linking my PR here haha, #962 |
Gotta leave a "fixes/resolves #962" in either the commit message or PR description, not the title for it to do that automagically. https://help.github.com/articles/closing-issues-using-keywords/ |
Updated :D |
* Move REST requests to appropiate class * Add call to ClientHelper and expose to public API * Expose shard count request in public api * Expose method from interface * Update sharded client to utilize the new method * Method is already implemented in a base class * Refactor name to fit pattern for methods returning a `Task` * Adds missing ConfigureAwait * Corrects unnecessary whitespace * Removes unneeded whitespace
* Move REST requests to appropiate class * Add call to ClientHelper and expose to public API * Expose shard count request in public api * Expose method from interface * Update sharded client to utilize the new method * Method is already implemented in a base class * Refactor name to fit pattern for methods returning a `Task` * Adds missing ConfigureAwait * Corrects unnecessary whitespace * Removes unneeded whitespace
Because of the way I have been developing my bot, I wanted it from the very beginning to be able to retrieve the correct shard count recommended by discord. During the login process the data is retrieved but it is not exposed in the public API.
I would like to propose exposing this property or it's data in the public API in someone wanted to use it when starting their shards manually without using the
DiscordShardedClient
object.If this does not fit the "meta" is there an alternative method I can use to acquire this information myself?
The text was updated successfully, but these errors were encountered: