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");

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)
    .await?;

Implementations

Specify this override to be for a member.

Specify this override to be for a role.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.