Struct twilight_http::request::channel::UpdateChannelPermission [−][src]
pub struct UpdateChannelPermission<'a> { /* fields omitted */ }Expand description
Update the permissions for a role or a user in a channel.
Examples:
Create permission overrides for a role to view the channel, but not send messages:
use twilight_http::Client; use twilight_model::guild::Permissions; use twilight_model::id::{ChannelId, RoleId}; let client = Client::new("my token".to_owned()); let channel_id = ChannelId(123); let allow = Permissions::VIEW_CHANNEL; let deny = Permissions::SEND_MESSAGES; let role_id = RoleId(432); client.update_channel_permission(channel_id, allow, deny) .role(role_id) .exec() .await?;
Implementations
Specify this override to be for a member.
Specify this override to be for a role.