[][src]Struct serenity::builder::EditChannel

pub struct EditChannel(pub HashMap<&'static str, Value>);

A builder to edit a GuildChannel for use via GuildChannel::edit

Defaults are not directly provided by the builder itself.

Examples

Edit a channel, providing a new name and topic:

This example is not tested
// assuming a channel has already been bound
if let Err(why) = channel::edit(|c| c.name("new name").topic("a test topic")) {
    // properly handle the error
}

Methods

impl EditChannel[src]

pub fn bitrate(&mut self, bitrate: u64) -> &mut Self[src]

The bitrate of the channel in bits.

This is for voice channels only.

pub fn name<S: ToString>(&mut self, name: S) -> &mut Self[src]

The name of the channel.

Must be between 2 and 100 characters long.

pub fn position(&mut self, position: u64) -> &mut Self[src]

The position of the channel in the channel list.

pub fn topic<S: ToString>(&mut self, topic: S) -> &mut Self[src]

The topic of the channel. Can be empty.

Must be between 0 and 1024 characters long.

This is for text channels only.

pub fn nsfw(&mut self, nsfw: bool) -> &mut Self[src]

Is the channel inappropriate for work?

This is for text channels only.

pub fn user_limit(&mut self, user_limit: u64) -> &mut Self[src]

The number of users that may be in the channel simultaneously.

This is for voice channels only.

pub fn category<C: Into<Option<ChannelId>>>(&mut self, category: C) -> &mut Self[src]

The parent category of the channel.

This is for text and voice channels only.

pub fn slow_mode_rate(&mut self, seconds: u64) -> &mut Self[src]

The seconds a user has to wait before sending another message.

Info: Only values from 0 to 120 are valid.

Trait Implementations

impl Default for EditChannel[src]

impl Clone for EditChannel[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for EditChannel[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Erased for T

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err

impl<T> DebugAny for T where
    T: Any + Debug
[src]

impl<T> CloneAny for T where
    T: Clone + Any
[src]

impl<T> UnsafeAny for T where
    T: Any