#[non_exhaustive]pub struct ModifyGuildScheduledEvent {
pub channel_id: Patch<ChannelId>,
pub entity_metadata: Patch<EntityMetadata>,
pub name: Option<CompactString>,
pub privacy_level: Option<PrivacyLevel>,
pub scheduled_start_time: Option<Timestamp>,
pub scheduled_end_time: Option<Timestamp>,
pub description: Patch<CompactString>,
pub entity_type: Option<EntityType>,
pub status: Option<Status>,
pub image: Patch<ImageData>,
pub recurrence_rule: Patch<RecurrenceRuleData>,
}Expand description
The body of Modify Guild Scheduled Event.
Every field is optional; Patch fields can also be cleared. Starting, ending or
canceling an event is a change of status. Moving an event to
EntityType::External needs channel_id set to Patch::Clear,
a location in entity_metadata and a
scheduled_end_time.
discord.js counterpart: GuildScheduledEventEditOptions.
§Examples
use djs_model::{guild_scheduled_event::Status, rest::ModifyGuildScheduledEvent};
let mut body = ModifyGuildScheduledEvent::default();
body.status = Some(Status::Active); // start the event
assert_eq!(serde_json::to_string(&body)?, r#"{"status":2}"#);Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.channel_id: Patch<ChannelId>The stage or voice channel; Patch::Clear when moving the event outside.
entity_metadata: Patch<EntityMetadata>The location of an external event (ignored for other events).
name: Option<CompactString>The name (1-100 characters).
privacy_level: Option<PrivacyLevel>Who can see the event.
scheduled_start_time: Option<Timestamp>When the event starts.
scheduled_end_time: Option<Timestamp>When the event ends.
description: Patch<CompactString>The description; Patch::Clear removes it.
entity_type: Option<EntityType>Where the event takes place.
status: Option<Status>The status: scheduled events can become active or canceled, active events completed.
image: Patch<ImageData>The cover image; Patch::Clear removes it.
recurrence_rule: Patch<RecurrenceRuleData>How the event repeats; Patch::Clear makes it a one-time event.