Struct twilight_http::request::guild::UpdateGuild
source · [−]pub struct UpdateGuild<'a> { /* private fields */ }Expand description
Update a guild.
All endpoints are optional. See Discord Docs/Modify Guild.
Implementations
sourceimpl<'a> UpdateGuild<'a>
impl<'a> UpdateGuild<'a>
sourcepub const fn afk_channel_id(
self,
afk_channel_id: Option<Id<ChannelMarker>>
) -> Self
pub const fn afk_channel_id(
self,
afk_channel_id: Option<Id<ChannelMarker>>
) -> Self
Set the voice channel where AFK voice users are sent.
sourcepub const fn afk_timeout(self, afk_timeout: u64) -> Self
pub const fn afk_timeout(self, afk_timeout: u64) -> Self
Set how much time it takes for a voice user to be considered AFK.
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.
sourcepub const fn default_message_notifications(
self,
default_message_notifications: Option<DefaultMessageNotificationLevel>
) -> Self
pub const fn default_message_notifications(
self,
default_message_notifications: Option<DefaultMessageNotificationLevel>
) -> Self
Set the default message notification level. See Discord Docs/Create Guild for more information.
sourcepub const fn discovery_splash(self, discovery_splash: Option<&'a str>) -> Self
pub const fn discovery_splash(self, discovery_splash: Option<&'a str>) -> Self
Set the guild’s discovery splash image.
Requires the guild to have the DISCOVERABLE feature enabled.
sourcepub const fn explicit_content_filter(
self,
explicit_content_filter: Option<ExplicitContentFilter>
) -> Self
pub const fn explicit_content_filter(
self,
explicit_content_filter: Option<ExplicitContentFilter>
) -> Self
Set the explicit content filter level.
sourcepub const fn features(self, features: &'a [&'a str]) -> Self
pub const fn features(self, features: &'a [&'a str]) -> Self
Set the enabled features of the guild.
sourcepub const fn icon(self, icon: Option<&'a str>) -> Self
pub const fn icon(self, icon: Option<&'a str>) -> Self
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. See Discord Docs/Image Data.
sourcepub fn name(self, name: &'a str) -> Result<Self, ValidationError>
pub fn name(self, name: &'a str) -> Result<Self, ValidationError>
sourcepub const fn owner_id(self, owner_id: Id<UserMarker>) -> Self
pub const fn owner_id(self, owner_id: Id<UserMarker>) -> Self
Transfer ownership to another user.
Only works if the current user is the owner.
sourcepub const fn splash(self, splash: Option<&'a str>) -> Self
pub const fn splash(self, splash: Option<&'a str>) -> Self
Set the guild’s splash image.
Requires the guild to have the INVITE_SPLASH feature enabled.
sourcepub const fn system_channel(
self,
system_channel_id: Option<Id<ChannelMarker>>
) -> Self
pub const fn system_channel(
self,
system_channel_id: Option<Id<ChannelMarker>>
) -> Self
Set the channel where events such as welcome messages are posted.
sourcepub const fn system_channel_flags(
self,
system_channel_flags: Option<SystemChannelFlags>
) -> Self
pub const fn system_channel_flags(
self,
system_channel_flags: Option<SystemChannelFlags>
) -> Self
Set the guild’s SystemChannelFlags.
sourcepub const fn rules_channel(
self,
rules_channel_id: Option<Id<ChannelMarker>>
) -> Self
pub const fn rules_channel(
self,
rules_channel_id: Option<Id<ChannelMarker>>
) -> Self
Set the rules channel.
Requires the guild to be PUBLIC. See Discord Docs/Modify Guild.
sourcepub const fn public_updates_channel(
self,
public_updates_channel_id: Option<Id<ChannelMarker>>
) -> Self
pub const fn public_updates_channel(
self,
public_updates_channel_id: Option<Id<ChannelMarker>>
) -> Self
Set the public updates channel.
Requires the guild to be PUBLIC.
sourcepub const fn preferred_locale(self, preferred_locale: Option<&'a str>) -> Self
pub const fn preferred_locale(self, preferred_locale: Option<&'a str>) -> Self
Set the preferred locale for the guild.
Defaults to en-US. Requires the guild to be PUBLIC.
sourcepub const fn verification_level(
self,
verification_level: Option<VerificationLevel>
) -> Self
pub const fn verification_level(
self,
verification_level: Option<VerificationLevel>
) -> Self
Set the verification level.
Set whether the premium progress bar is enabled.
sourcepub fn exec(self) -> ResponseFuture<PartialGuild>ⓘNotable traits for ResponseFuture<T>impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
pub fn exec(self) -> ResponseFuture<PartialGuild>ⓘNotable traits for ResponseFuture<T>impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
Execute the request, returning a future resolving to a Response.
Trait Implementations
sourceimpl<'a> AuditLogReason<'a> for UpdateGuild<'a>
impl<'a> AuditLogReason<'a> for UpdateGuild<'a>
fn reason(self, reason: &'a str) -> Result<Self, ValidationError>
sourceimpl TryIntoRequest for UpdateGuild<'_>
impl TryIntoRequest for UpdateGuild<'_>
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more