-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
fix(DiscordJS): fix the way that the client filler gets the shard ID in v12 #184
Conversation
Codecov Report
@@ Coverage Diff @@
## master #184 +/- ##
=======================================
Coverage 97.67% 97.68%
=======================================
Files 45 45
Lines 1205 1210 +5
Branches 192 194 +2
=======================================
+ Hits 1177 1182 +5
Misses 27 27
Partials 1 1
Continue to review full report at Codecov.
|
You can read off of Actually, since |
I've updated the getter, is it better now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After this, LGTM
Co-authored-by: Snazzah <[email protected]>
Line 41 was explicitly removing support for manual sharding. If you're spawning shards manually you're supposed to provide the shard data yourself in the Poster options.
I noticed that the v12
ShardClientUtil
does not contain the ID of the shard you're using. I figured out that the only way to get the shard id is to get a guild and take it from there.I'm not sure about this though: that strategy relies on the fact that every guild cached will have the same shard ID. Are we sure about that? Is it possible that selecting a random guild will result in the wrong shard ID? Is there a better alternative (like maybe taking the most used shard ID)?
Let me know what you think