Struct twilight_http::request::guild::update_guild::UpdateGuild[][src]

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

Update a guild.

All endpoints are optional. Refer to the discord docs for more information.

Implementations

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

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

Set the voice channel where AFK voice users are sent.

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

Set how much time it takes for a voice user to be considered AFK.

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

Set the banner.

This is a base64 encoded 16:9 PNG or JPEG image. Pass None to remove the banner.

The server must have the BANNER feature.

pub fn default_message_notifications(
    self,
    default_message_notifications: impl Into<Option<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: impl Into<Option<ExplicitContentFilter>>
) -> Self
[src]

Set the explicit content filter level.

pub fn icon(self, icon: impl Into<Option<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 name(self, name: impl Into<String>) -> Result<Self, UpdateGuildError>[src]

Set the name of the guild.

The minimum length is 2 UTF-16 characters and the maximum is 100 UTF-16 characters.

Erroors

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

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

Transfer ownership to another user.

Only works if the current user is the owner.

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

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

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

Set the guild’s splash image.

Requires the guild to have the INVITE_SPLASH feature enabled.

pub fn system_channel(
    self,
    system_channel_id: impl Into<Option<ChannelId>>
) -> Self
[src]

Set the channel where events such as welcome messages are posted.

pub fn rules_channel(
    self,
    rules_channel_id: impl Into<Option<ChannelId>>
) -> Self
[src]

Set the rules channel.

Requires the guild to be PUBLIC. Refer to the discord docs for more information.

pub fn public_updates_channel(
    self,
    public_updates_channel_id: impl Into<Option<ChannelId>>
) -> Self
[src]

Set the public updates channel.

Requires the guild to be PUBLIC.

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

Set the preferred locale for the guild.

Defaults to en-US. Requires the guild to be PUBLIC.

pub fn verification_level(
    self,
    verification_level: impl Into<Option<VerificationLevel>>
) -> Self
[src]

Set the verification level. Refer to the discord docs for more information.

Trait Implementations

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

impl Future for UpdateGuild<'_>[src]

type Output = Result<PartialGuild>

The type of value produced on completion.

Auto Trait Implementations

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

impl<'a> Send for UpdateGuild<'a>

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

impl<'a> Unpin for UpdateGuild<'a>

impl<'a> !UnwindSafe for UpdateGuild<'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> 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>,