-
-
Notifications
You must be signed in to change notification settings - Fork 134
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
feat(gateway): custom shard presences on identify #1474
Conversation
Provides a function that takes a `HashMap<u64, UpdatePresencePayload>` which customizes the presence of a shard's session. Closes twilight-rs#1472.# one of build,chore,ci,docs,style,refactor,perf,test
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.
Should we remove the presence
methods now?
I would be in favor of this. We could change |
take an anonymous closure instead of a known type, implement debug for Config
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.
lgtm in the current state, more generic approaches can be added in a future PR
Co-authored-by: BlackHoleFox <[email protected]>
Additions Add `Information::{ratelimit_refill, ratelimit_requests}` to view how much time until the shard ratelimiter resets and how many requests until the next refill ([#1368] - [@itohatweb]) Add `ClusterBuilder::shard_presence`, which allows setting a custom presence based on a shard's ID ([#1474] - [@7596ff]). Changes The `rustls` feature has been removed ([#1314] - [@Gelbpunkt]). Users must manually select one of `rustls-native-roots` or `rustls-webpki-roots`. `{CommandErrorType, SendErrorType}::ExecutorShutDown` have been removed, since they are no longer possible ([#1368] - [@itohatweb]). No longer derive `Deserialize` and `Serialize` on `Information` ([#1368] - [@itohatweb]). The MSRV has been updated to 1.57 ([#1402] - [@zeylahellyer]). The Rust edition has been updated to 2021 ([#1412] - [@vilgotf]). Constructors that used to take `impl Into<String>` now simply accept a `String` ([#1481] - [@vilgotf]). [#1314]: #1314 [#1368]: #1368 [#1402]: #1402 [#1412]: #1412 [#1474]: #1474 [#1481]: #1481 [@7596ff]: https://github.com/7596ff [@itohatweb]: https://github.com/itohatweb [@Gelbpunkt]: https://github.com/Gelbpunkt [@vilgotf]: https://github.com/vilgotf [@zeylahellyer]: https://github.com/zeylahellyer
Provides a function that takes a closure which allows setting a shard's presence based on its id.
Closes #1472.