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.
Attempting to add or remove the COMMUNITY
feature requires the
Permissions::ADMINISTRATOR
permission.
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
.