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
sourceimpl<'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>
) -> Result<Self, ValidationError>
pub fn description(
self,
description: Option<&'a str>
) -> Result<Self, ValidationError>
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 const fn image(self, image: Option<&'a str>) -> Self
pub const 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 const fn location(self, location: Option<&'a str>) -> Self
pub const 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) -> Result<Self, ValidationError>
pub fn name(self, name: &'a str) -> Result<Self, ValidationError>
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 const fn scheduled_end_time(
self,
scheduled_end_time: Option<&'a Timestamp>
) -> Self
pub const 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 const fn scheduled_start_time(
self,
scheduled_start_time: &'a Timestamp
) -> Self
pub const fn scheduled_start_time(
self,
scheduled_start_time: &'a Timestamp
) -> Self
Set the scheduled start time of the event.
sourcepub fn exec(self) -> ResponseFuture<GuildScheduledEvent>ⓘNotable traits for ResponseFuture<T>impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
pub fn exec(self) -> ResponseFuture<GuildScheduledEvent>ⓘ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 UpdateGuildScheduledEvent<'a>
impl<'a> AuditLogReason<'a> for UpdateGuildScheduledEvent<'a>
sourceimpl TryIntoRequest for UpdateGuildScheduledEvent<'_>
impl TryIntoRequest for UpdateGuildScheduledEvent<'_>
Auto Trait Implementations
impl<'a> !RefUnwindSafe for UpdateGuildScheduledEvent<'a>
impl<'a> Send for UpdateGuildScheduledEvent<'a>
impl<'a> Sync for UpdateGuildScheduledEvent<'a>
impl<'a> Unpin for UpdateGuildScheduledEvent<'a>
impl<'a> !UnwindSafe for UpdateGuildScheduledEvent<'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