pub struct UpdateGuild<'a> { /* private fields */ }
Expand description
Update a guild.
All endpoints are optional. See Discord Docs/Modify Guild.
Implementations§
source§impl<'a> UpdateGuild<'a>
impl<'a> UpdateGuild<'a>
sourcepub fn afk_channel_id(self, afk_channel_id: Option<Id<ChannelMarker>>) -> Self
pub fn afk_channel_id(self, afk_channel_id: Option<Id<ChannelMarker>>) -> Self
Set the voice channel where AFK voice users are sent.
sourcepub fn afk_timeout(self, afk_timeout: u64) -> Self
pub 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 fn default_message_notifications(
self,
default_message_notifications: Option<DefaultMessageNotificationLevel>,
) -> Self
pub 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 fn discovery_splash(self, discovery_splash: Option<&'a str>) -> Self
pub 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 fn explicit_content_filter(
self,
explicit_content_filter: Option<ExplicitContentFilter>,
) -> Self
pub fn explicit_content_filter( self, explicit_content_filter: Option<ExplicitContentFilter>, ) -> Self
Set the explicit content filter level.
sourcepub fn features(self, features: &'a [&'a str]) -> Self
pub fn features(self, features: &'a [&'a str]) -> Self
Set the enabled features of the guild.
Attempting to add or remove the GuildFeature::Community
feature requires the
Permissions::ADMINISTRATOR
permission.
Attempting to add or remove the GuildFeature::Discoverable
feature requires
the Permissions::ADMINISTRATOR
permission. Additionally the guild
must pass all the discovery requirements.
Attempting to add or remove the GuildFeature::InvitesDisabled
feature requires
the Permissions::MANAGE_GUILD
permission.
sourcepub fn icon(self, icon: Option<&'a str>) -> Self
pub 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 owner_id(self, owner_id: Id<UserMarker>) -> Self
pub fn owner_id(self, owner_id: Id<UserMarker>) -> Self
Transfer ownership to another user.
Only works if the current user is the owner.
sourcepub fn splash(self, splash: Option<&'a str>) -> Self
pub 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 fn system_channel(
self,
system_channel_id: Option<Id<ChannelMarker>>,
) -> Self
pub fn system_channel( self, system_channel_id: Option<Id<ChannelMarker>>, ) -> Self
Set the channel where events such as welcome messages are posted.
sourcepub fn system_channel_flags(
self,
system_channel_flags: Option<SystemChannelFlags>,
) -> Self
pub fn system_channel_flags( self, system_channel_flags: Option<SystemChannelFlags>, ) -> Self
Set the guild’s SystemChannelFlags
.
sourcepub fn rules_channel(self, rules_channel_id: Option<Id<ChannelMarker>>) -> Self
pub 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 fn public_updates_channel(
self,
public_updates_channel_id: Option<Id<ChannelMarker>>,
) -> Self
pub 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 fn preferred_locale(self, preferred_locale: Option<&'a str>) -> Self
pub 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 fn verification_level(
self,
verification_level: Option<VerificationLevel>,
) -> Self
pub fn verification_level( self, verification_level: Option<VerificationLevel>, ) -> Self
Set the verification level.
Set whether the premium progress bar is enabled.