Struct serenity::model::ChannelCategory
[−]
[src]
pub struct ChannelCategory {
pub id: ChannelId,
pub category_id: Option<ChannelId>,
pub position: i64,
pub kind: ChannelType,
pub name: String,
pub nsfw: bool,
pub permission_overwrites: Vec<PermissionOverwrite>,
}A category of GuildChannels.
Fields
id: ChannelId
Id of this category.
category_id: Option<ChannelId>
If this category belongs to another category.
position: i64
The position of this category.
kind: ChannelType
Indicator of the type of channel this is.
This should always be ChannelType::Category.
name: String
The name of the category.
nsfw: bool
Whether this category is nsfw. (This'll be inherited by all channels in this category)
permission_overwrites: Vec<PermissionOverwrite>
Permission overwrites for the GuildChannels.
Methods
impl ChannelCategory[src]
fn create_permission(&self, target: &PermissionOverwrite) -> Result<()>[src]
Adds a permission overwrite to the category's channels.
fn delete_permission(
&self,
permission_type: PermissionOverwriteType
) -> Result<()>[src]
&self,
permission_type: PermissionOverwriteType
) -> Result<()>
Deletes all permission overrides in the category from the channels.
Note: Requires the Manage Channel permission.
fn delete(&self) -> Result<()>[src]
Deletes this category.
fn edit<F>(&mut self, f: F) -> Result<()> where
F: FnOnce(EditChannel) -> EditChannel, [src]
F: FnOnce(EditChannel) -> EditChannel,
Modifies the category's settings, such as its position or name.
Refer to EditChannels documentation for a full list of methods.
Examples
Change a voice channels name and bitrate:
category.edit(|c| c.name("test").bitrate(86400));
fn is_nsfw(&self) -> bool[src]
fn name(&self) -> &str[src]
Returns the name of the category.
Trait Implementations
impl Clone for ChannelCategory[src]
fn clone(&self) -> ChannelCategory[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more