Skip to content
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

Implement VOICE_CHANNEL_STATUS_UPDATE #2565

Merged
merged 4 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions command_attr/src/structures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ impl Permissions {
"SEND_MESSAGES_IN_THREADS" => 1 << 38,
"USE_EMBEDDED_ACTIVITIES" => 1 << 39,
"MODERATE_MEMBERS" => 1 << 40,
"SET_VOICE_CHANNEL_STATUS" => 1 << 48,
_ => return None,
}))
}
Expand Down
10 changes: 10 additions & 0 deletions src/builder/edit_channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ pub struct EditChannel<'a> {
default_sort_order: Option<SortOrder>,
#[serde(skip_serializing_if = "Option::is_none")]
default_forum_layout: Option<ForumLayoutType>,
#[serde(skip_serializing_if = "Option::is_none")]
status: Option<String>,

#[serde(skip)]
audit_log_reason: Option<&'a str>,
Expand Down Expand Up @@ -287,6 +289,14 @@ impl<'a> EditChannel<'a> {
self.default_forum_layout = Some(default_forum_layout);
self
}
/// The status of a voice channel.
/// The user must be within the channel to change the status but if the
/// user has Manage Channels the user can reset it without being in the channel.
/// Can be None, an empty string or up to 500 characters.
pub fn status(mut self, status: impl Into<Option<String>>) -> Self {
self.status = status.into();
self
}
jamesbt365 marked this conversation as resolved.
Show resolved Hide resolved
}

#[cfg(feature = "http")]
Expand Down