diff --git a/src/builder/edit_channel.rs b/src/builder/edit_channel.rs index c6e688aa8c2..17d7a4f2cb7 100644 --- a/src/builder/edit_channel.rs +++ b/src/builder/edit_channel.rs @@ -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?; }