pub struct UpdateGuildScheduledEvent<'a> { /* private fields */ }
Expand description
Update a scheduled event in a guild.
This endpoint supports changing the type of event. When changing the entity
type to either EntityType::StageInstance
or EntityType::Voice
, an
Id<ChannelMarker>
must be provided if it does not already exist.
When changing the entity type to EntityType::External
, the channel_id
field is cleared and the channel_id
method has no effect. Additionally,
you must set a location with location
.
Implementations§
source§impl<'a> UpdateGuildScheduledEvent<'a>
impl<'a> UpdateGuildScheduledEvent<'a>
sourcepub fn channel_id(self, channel_id: Id<ChannelMarker>) -> Self
pub fn channel_id(self, channel_id: Id<ChannelMarker>) -> Self
Set the channel ID.
If entity_type
is already EntityType::External
, this has no
effect.
sourcepub fn description(self, description: Option<&'a str>) -> Self
pub fn description(self, description: Option<&'a str>) -> Self
Set the description of the event.
Must be between 1 and 1000 characters in length.
§Errors
Returns an error of type ScheduledEventDescription
if the
description is invalid.
sourcepub fn entity_type(self, entity_type: EntityType) -> Self
pub fn entity_type(self, entity_type: EntityType) -> Self
Set the EntityType
of the scheduled event.
See the struct-level documentation for information about required fields for each type.
sourcepub fn image(self, image: Option<&'a str>) -> Self
pub fn image(self, image: Option<&'a str>) -> Self
Set the cover image of the event.
Pass None
to clear the image.
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 location(self, location: Option<&'a str>) -> Self
pub fn location(self, location: Option<&'a str>) -> Self
Set the location of the external scheduled event.
This only functions if the event’s EntityType
is External
.
sourcepub fn name(self, name: &'a str) -> Self
pub fn name(self, name: &'a str) -> Self
Set the name of the event.
Must be between 1 and 100 characters in length.
§Errors
Returns an error of type ScheduledEventName
if the name is invalid.
sourcepub fn scheduled_end_time(
self,
scheduled_end_time: Option<&'a Timestamp>,
) -> Self
pub fn scheduled_end_time( self, scheduled_end_time: Option<&'a Timestamp>, ) -> Self
Set the scheduled end time of the event.
Required for external events.
sourcepub fn scheduled_start_time(self, scheduled_start_time: &'a Timestamp) -> Self
pub fn scheduled_start_time(self, scheduled_start_time: &'a Timestamp) -> Self
Set the scheduled start time of the event.