feat: voice channel status - #2419
Open
HTGAzureX1212 wants to merge 8 commits into
Open
Conversation
AEnterprise
approved these changes
Jul 27, 2025
raventhyme
requested changes
Jul 12, 2026
| /// Current user's profile has been updated. | ||
| const USER_UPDATE = 1 << 41; | ||
| /// A voice channel status has been updated. | ||
| const VOICE_CHANNEL_STATUS_UPDATE = 1 << 79; |
Member
There was a problem hiding this comment.
This has since been used and a new bit will have to be used.
|
|
||
| /// Sets the status of a voice channel. | ||
| #[must_use = "requests must be configured and executed"] | ||
| pub struct SetVoiceChannelStatus<'a> { |
Member
There was a problem hiding this comment.
Comment on lines
+35
to
+43
| pub fn status(mut self, status: &'a str) -> Self { | ||
| self.fields = self.fields.and_then(|mut fields| { | ||
| validate_status(status)?; | ||
| fields.status.replace(status); | ||
|
|
||
| Ok(fields) | ||
| }); | ||
|
|
||
| self |
Member
There was a problem hiding this comment.
status is documented as a required field consisting of a nullable string. This should be in new and should be Option<&'a str>. If the user doesn't call this method then the response should be a 400.
| ) -> SetVoiceChannelStatus<'_> { | ||
| SetVoiceChannelStatus::new(self, channel_id) | ||
| } | ||
|
|
Member
There was a problem hiding this comment.
There's ultimately no real organizational scheme to client method ordering, but would this make more sense somewhere around update_channel and its related methods?
Comment on lines
+14
to
+15
| #[serde(skip_serializing_if = "Option::is_none")] | ||
| status: Option<&'a str>, |
Member
There was a problem hiding this comment.
See comment below. If None then this should serialize as null
Suggested change
| #[serde(skip_serializing_if = "Option::is_none")] | |
| status: Option<&'a str>, | |
| status: Option<&'a str>, |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Corresponding Discord API Documentation PR(s): discord/discord-api-docs#6400 and discord/discord-api-docs#6398