pub struct EditScheduledEvent<'a> { /* private fields */ }
Expand description
Implementations§
Source§impl<'a> EditScheduledEvent<'a>
impl<'a> EditScheduledEvent<'a>
Sourcepub fn new() -> Self
pub fn new() -> Self
Equivalent to Self::default
.
Sourcepub fn channel_id(self, channel_id: impl Into<ChannelId>) -> Self
pub fn channel_id(self, channel_id: impl Into<ChannelId>) -> Self
Sets the channel id of the scheduled event. If the kind
of the event is changed from
External
to either StageInstance
or Voice
, then this field is also required.
Sourcepub fn privacy_level(self, privacy_level: ScheduledEventPrivacyLevel) -> Self
pub fn privacy_level(self, privacy_level: ScheduledEventPrivacyLevel) -> Self
The privacy level of the scheduled event
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
Sets the description of the scheduled event.
Sourcepub fn start_time(self, timestamp: impl Into<Timestamp>) -> Self
pub fn start_time(self, timestamp: impl Into<Timestamp>) -> Self
Sets the start time of the scheduled event.
Sourcepub fn kind(self, kind: ScheduledEventType) -> Self
pub fn kind(self, kind: ScheduledEventType) -> Self
Sets the entity type of the scheduled event.
If changing to External
, then end_time
and location
must also be set.
Otherwise, if changing to either StageInstance
or Voice
, then channel_id
is
also required to be set.
See the Discord docs for more details.
Sourcepub fn status(self, status: ScheduledEventStatus) -> Self
pub fn status(self, status: ScheduledEventStatus) -> Self
Sourcepub fn image(self, image: &CreateAttachment) -> Self
pub fn image(self, image: &CreateAttachment) -> Self
Sets the cover image for the scheduled event.
Sourcepub fn audit_log_reason(self, reason: &'a str) -> Self
pub fn audit_log_reason(self, reason: &'a str) -> Self
Sets the request’s audit log reason.
Trait Implementations§
Source§impl Builder for EditScheduledEvent<'_>
impl Builder for EditScheduledEvent<'_>
Source§fn execute<'life0, 'async_trait>(
self,
cache_http: impl 'async_trait + CacheHttp,
ctx: Self::Context<'life0>,
) -> Pin<Box<dyn Future<Output = Result<Self::Built>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
self,
cache_http: impl 'async_trait + CacheHttp,
ctx: Self::Context<'life0>,
) -> Pin<Box<dyn Future<Output = Result<Self::Built>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Modifies a scheduled event in the guild with the data set, if any.
Note: If the event was created by the current user, requires either Create Events or the Manage Events permission. Otherwise, the Manage Events permission is required.
§Errors
If the cache
is enabled, returns a ModelError::InvalidPermissions
if the current user
lacks permission. Otherwise returns Error::Http
, as well as if invalid data is given.
Source§type Context<'ctx> = (GuildId, ScheduledEventId)
type Context<'ctx> = (GuildId, ScheduledEventId)
type Built = ScheduledEvent
Source§impl<'a> Clone for EditScheduledEvent<'a>
impl<'a> Clone for EditScheduledEvent<'a>
Source§fn clone(&self) -> EditScheduledEvent<'a>
fn clone(&self) -> EditScheduledEvent<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more