Skip to content

Commit

Permalink
Update src/builder/edit_channel.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Alex M. M. <[email protected]>
  • Loading branch information
rhgndf and arqunis authored Oct 16, 2024
1 parent 20868ce commit 4659124
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/builder/edit_channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,10 +337,15 @@ impl<'a> Builder for EditChannel<'a> {
}
}

if let Some(ref status) = self.status {
if let Some(status) = &self.status {
#[derive(Serialize)]
struct EditVoiceStatusBody<'a> {
status: &'a str,
}

cache_http
.http()
.edit_voice_status(ctx, &json!({ "status": status }), self.audit_log_reason)
.edit_voice_status(ctx, &EditVoiceStatusBody { status: status.as_str() }, self.audit_log_reason)
.await?;
}

Expand Down

0 comments on commit 4659124

Please sign in to comment.