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>

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

pub const fn scheduled_start_time( self, scheduled_start_time: &'a Timestamp ) -> Self

Set the scheduled start time of the event.

source

pub const fn status(self, status: Status) -> Self

Set the status of the event.

If an event is currently Scheduled, it can only be set to Active or Cancelled. If it is currently Active, it can only be set to Completed. Otherwise, the status can not be updated.

source

pub fn exec(self) -> ResponseFuture<GuildScheduledEvent>

👎Deprecated since 0.14.0: use .await or into_future instead

Execute the request, returning a future resolving to a Response.

Trait Implementations§

source§

impl<'a> AuditLogReason<'a> for UpdateGuildScheduledEvent<'a>

source§

fn reason(self, reason: &'a str) -> Result<Self, ValidationError>

Attach an audit log reason to the request. Read more
source§

impl IntoFuture for UpdateGuildScheduledEvent<'_>

§

type Output = Result<Response<GuildScheduledEvent>, Error>

The output that the future will produce on completion.
§

type IntoFuture = ResponseFuture<GuildScheduledEvent>

Which kind of future are we turning this into?
source§

fn into_future(self) -> Self::IntoFuture

Creates a future from a value. Read more
source§

impl TryIntoRequest for UpdateGuildScheduledEvent<'_>

source§

fn try_into_request(self) -> Result<Request, Error>

Try to convert a request builder into a raw Request. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

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
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more