[][src]Struct twilight_http::request::guild::create_guild_channel::CreateGuildChannel

pub struct CreateGuildChannel<'a> { /* fields omitted */ }

Create a new request to create a guild channel.

All fields are optional except for name. The minimum length of the name is 2 UTF-16 characters and the maximum is 100 UTF-16 characters.

Errors

Returns a CreateGuildChannelError::NameInvalid when the length of the name is either fewer than 2 UTF-16 characters or more than 100 UTF-16 characters.

Returns a CreateGuildChannelError::RateLimitPerUserInvalid when the seconds of the rate limit per user is more than 21600.

Returns a CreateGuildChannelError::TopicInvalid when the length of the topic is more than 1024 UTF-16 characters.

Implementations

impl<'a> CreateGuildChannel<'a>[src]

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

Set the bitrate of the channel. Applicable to voice channels only.

pub fn kind(mut self: Self, kind: ChannelType) -> Self[src]

Set the kind of channel.

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

Set whether the channel is marked as NSFW.

pub fn parent_id(mut self: Self, parent_id: impl Into<ChannelId>) -> Self[src]

If this is specified, and the parent ID is a ChannelType::CategoryChannel, create this channel as a child of the category channel.

pub fn permission_overwrites(
    mut self: Self,
    permission_overwrites: Vec<PermissionOverwrite>
) -> Self
[src]

Set the permission overwrites of a channel.

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

Set the position of the channel.

Positions are numerical and zero-indexed. If you place a channel at position 2, channels 2-n will shift down one position and the initial channel will take its place.

pub fn rate_limit_per_user(
    mut self: Self,
    rate_limit_per_user: u64
) -> Result<Self, CreateGuildChannelError>
[src]

Set the number of seconds that a user must wait before before they are able to send another message.

The minimum is 0 and the maximum is 21600. Refer to the discord docs for more details. This is also known as "Slow Mode".

Errors

Returns CreateGuildChannelError::RateLimitPerUserInvalid if the amount is greater than 21600.

pub fn topic(
    self,
    topic: impl Into<String>
) -> Result<Self, CreateGuildChannelError>
[src]

Set the topic.

The maximum length is 1024 UTF-16 characters. Refer to the discord docs for more details.

Errors

Returns CreateGuildChannelError::TopicInvalid if the topic length is too long.

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

For voice channels, set the user limit.

Set to 0 for no limit. Limit can otherwise be between 1 and 99 inclusive. Refer to the discord docs for more details.

Trait Implementations

impl<'a> AuditLogReason for CreateGuildChannel<'a>[src]

impl Future for CreateGuildChannel<'_>[src]

type Output = Result<GuildChannel>

The type of value produced on completion.

Auto Trait Implementations

Blanket Implementations

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

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

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

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

impl<T> FutureExt for T where
    T: Future + ?Sized
[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<F> IntoFuture for F where
    F: Future
[src]

type Output = <F as Future>::Output

🔬 This is a nightly-only experimental API. (into_future)

The output that the future will produce on completion.

type Future = F

🔬 This is a nightly-only experimental API. (into_future)

Which kind of future are we turning this into?

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<F, T, E> TryFuture for F where
    F: Future<Output = Result<T, E>> + ?Sized

type Ok = T

The type of successful values yielded by this future

type Error = E

The type of failures yielded by this future

impl<Fut> TryFutureExt for Fut where
    Fut: TryFuture + ?Sized
[src]

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<V, T> VZip<V> for T where
    V: MultiLane<T>,