[][src]Struct twilight_http::request::guild::create_guild::CreateGuild

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

Create a new request to create a guild.

The minimum length of the name is 2 UTF-16 characters and the maximum is 100 UTF-16 characters. This endpoint can only be used by bots in less than 10 guilds.

Errors

Returns CreateGuildError::NameInvalid if the name length is too short or too long.

Implementations

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

pub fn channels(
    self,
    channels: Vec<GuildChannel>
) -> Result<Self, CreateGuildError>
[src]

Set the channels to create with the guild.

The maximum number of channels that can be provided is 500.

Errors

Returns CreateGuildError::TooManyChannels if the number of channels is over 500.

pub fn default_message_notifications(
    self,
    default_message_notifications: DefaultMessageNotificationLevel
) -> Self
[src]

Set the default message notification level. Refer to the discord docs for more information.

pub fn explicit_content_filter(
    self,
    explicit_content_filter: ExplicitContentFilter
) -> Self
[src]

Set the explicit content filter level.

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

Set the icon.

This must be a Data URI, in the form of data:image/{type};base64,{data} where {type} is the image MIME type and {data} is the base64-encoded image. Refer to the discord docs for more information.

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

Specify the voice server region for the guild. Refer to the discord docs for more information.

pub fn roles(self, roles: Vec<Role>) -> Result<Self, CreateGuildError>[src]

Set the roles to create with the guild.

The maximum number of roles that can be provided is 250.

Errors

Returns CreateGuildError::TooManyRoles if the number of roles is over 250.

Trait Implementations

impl<'_> Future for CreateGuild<'_>[src]

type Output = Result<PartialGuild>

The type of value produced on completion.

Auto Trait Implementations

impl<'a> !RefUnwindSafe for CreateGuild<'a>

impl<'a> Send for CreateGuild<'a>

impl<'a> !Sync for CreateGuild<'a>

impl<'a> Unpin for CreateGuild<'a>

impl<'a> !UnwindSafe for CreateGuild<'a>

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

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.