-
-
Notifications
You must be signed in to change notification settings - Fork 136
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
Activities is required when updating presence #891
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR removes the `Some` from `UpdateStatusInfo`, as the list is now required. It also validates that at least one activity is present when using the `new` method. Fixes twilight-rs#858.
zeylahellyer
requested changes
Jun 6, 2021
zeylahellyer
approved these changes
Jun 7, 2021
Erk-
approved these changes
Jun 7, 2021
7596ff
added a commit
to 7596ff/twilight
that referenced
this pull request
Jun 13, 2021
…wilight-rs#891) This PR removes the `Some` from `UpdateStatusInfo`, as the list is now required. It also validates that at least one activity is present when using the `new` method. Fixes twilight-rs#858.
7596ff
added a commit
to 7596ff/twilight
that referenced
this pull request
Jun 13, 2021
…wilight-rs#891) This PR removes the `Some` from `UpdateStatusInfo`, as the list is now required. It also validates that at least one activity is present when using the `new` method. Fixes twilight-rs#858.
7596ff
added a commit
to 7596ff/twilight
that referenced
this pull request
Jun 13, 2021
…wilight-rs#891) This PR removes the `Some` from `UpdateStatusInfo`, as the list is now required. It also validates that at least one activity is present when using the `new` method. Fixes twilight-rs#858.
7596ff
added a commit
to 7596ff/twilight
that referenced
this pull request
Jun 13, 2021
…wilight-rs#891) This PR removes the `Some` from `UpdateStatusInfo`, as the list is now required. It also validates that at least one activity is present when using the `new` method. Fixes twilight-rs#858.
7596ff
added a commit
that referenced
this pull request
Jun 13, 2021
Upgrade Path Replace `zlib` features with their new names. Create a `Cluster` or `Shard` like this: ```diff -let cluster = Cluster::new(token, intents).await?; -let mut events = cluster.events(); +let (cluster, mut events) = Cluster::new(token, intents).await?; ``` Replace references to `UpdateStatus` and `UpdateStatusInfo` with `UpdatePresence` and `UpdatePresencePayload` respectively. Ensure at least one `Activity` is present in `UpdatePresence`. Changes The `zlib` feature choices have been renamed from `'stock-zlib` and `simd-zlib` to `zlib-stock` and `zlib-simd` respectively ([#829] - [@vivian]). `Cluster::new`, `ClusterBuilder::build`, `Shard::new`, and `ShardBuilder::build` now return a tuple with two elements: the cluster or shard itself and a stream of events. See the PR for more details ([#832] - [@vivian]). `UpdateStatus` and `UpdateStatusInfo` have been renamed to `UpdatePresence` and `UpdatePresencePayload` respectively ([#902] - [@7596ff]). At least one `Activity` is required when building an `UpdatePresence` payload. `UpdatePresenceError` and `UpdatePresenceErrorType` have been created to validate this ([#891] - [@7596ff]). [#829]: #829 [#832]: #832 [#891]: #891 [#902]: #902 [@7596ff]: https://github.com/7596ff [@vivian]: https://github.com/vivian
7596ff
added a commit
that referenced
this pull request
Jun 13, 2021
Upgrade Path Remove references to `Guild::nsfw`, `Guild::region`, `PartialGuild::nsfw`, `PartialGuild::region`, and `TemplateGuild::region`. Replace the following usages: ```diff -twilight_model::channel::invite::TargetUserType +twilight_model::channel::invite::TargetType -twilight_model::gateway::payload::update_status::UpdateStatus +twilight_model::gateway::payload::update_presence::UpdatePresence -twilight_model::gateway::payload::update_status::UpdateStatusInfo +twilight_model::gateway::payload::update_presence::UpdatePresencePayload ``` Additions Support for Slash Commands has been added. New models are present in the `application` module ([#932]). Enhancements The following models have been updated: - `twilight_model::channel::message::MessageFlags`: added `EPHEMERAL` - `twilight_model::channel::Message`: added `application_id`, `interaction` - `twilight_model::channel::WebhookType`: added `Application` - `twilight_model::gateway::Event`: added `InteractionCreate` - `twilight_model::gateway::payload::Ready`: added `application` - `twilight_model::guild::PartialMember`: added `permissions` Changes The `TargetType` re-export (`TargetUserType`) has been removed ([#847] - [@7596ff]). `Guild::nsfw` and `PartialGuild::nsfw` have been removed ([#890] - [@7596ff]). `UpdateStatus` and `UpdateStatusInfo` have been renamed to `UpdatePresence` and `UpdatePresencePayload` respectively ([#902] - [@7596ff]). At least one `Activity` is required when building an `UpdatePresence` payload. `UpdatePresenceError` and `UpdatePresenceErrorType` have been created to validate this ([#891] - [@7596ff]). References to `Guild::region` have been removed. This includes `PartialGuild::region` and `TemplateGuild::region` ([#930] - [@7596ff]). [#847]: #847 [#890]: #890 [#891]: #891 [#902]: #902 [#930]: #930 [#932]: #932 [@7596ff]: https://github.com/7596ff
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
c-gateway
Affects the gateway crate
c-model
Affects the model crate
d-api
Change related to Discord's API.
m-breaking change
Breaks the public API.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR removes the
Some
fromUpdateStatusInfo
, as the list is nowrequired. It also validates that at least one activity is present when
using the
new
method.Fixes #858.