Guild Scheduled Event Object
Guild Scheduled Event Structure
*
creator_id will be null and creator will not be included for events created before October 25th, 2021, when the concept of creator_id was introduced and tracked.
** See field requirements by entity type to understand the relationship between entity_type and the following fields: channel_id, entity_metadata, and scheduled_end_time
Guild Scheduled Event Privacy Level
Guild Scheduled Event Entity Types
Field Requirements By Entity Type
The following table shows field requirements based on current entity type.value : This field is required to be a non-null value
null : This field is required to be null
- : No strict requirements
*
entity_metadata with a non-null location must be provided
Guild Scheduled Event Status
* Once
status is set to COMPLETED or CANCELED, the status can no longer be updated
Valid Guild Scheduled Event Status Transitions
SCHEDULED —> ACTIVE ACTIVE --------> COMPLETED SCHEDULED —> CANCELEDGuild Scheduled Event Entity Metadata
* required for events with
'entity_type': EXTERNAL
Guild Scheduled Event User Object
Guild Scheduled Event User Structure
Guild Scheduled Event Recurrence Rule Object
Discord’s recurrence rule is a subset of the behaviors defined in the iCalendar RFC and implemented by python’s dateutil rruleGuild Scheduled Event Recurrence Rule Structure
[1] - Cannot be set externally currently.
System limitations
Recurrence rules are powerful, but they have some specific restrictions
System limitations
Recurrence rules are powerful, but they have some specific restrictions
The current system limitations are present due to how reoccurring event data needs to be displayed in the client.
In the future, we would like to open the system up to have fewer / none of these restrictions.
The following fields cannot be set by the client / application
countendby_year_day
The following combinations are mutually exclusive
by_weekdayby_n_weekdayby_month+by_month_day
by_weekday
- Only valid for daily and weekly events (
frequencyofDAILY(0) orWEEKLY(1)) - when used in a daily event (
frequencyisDAILY(0))- The values present in the
by_weekdayevent must be a “known set” of weekdays. - The following are current allowed “sets”
- Monday - Friday (
[0, 1, 2, 3, 4]) - Tuesday - Saturday (
[1, 2, 3, 4, 5]) - Sunday - Thursday (
[6, 0, 1, 2, 3]) - Friday & Saturday (
[4, 5]) - Saturday & Sunday (
[5, 6]) - Sunday & Monday (
[6, 0])
- Monday - Friday (
- The values present in the
- when used in a weekly event (
frequencyisWEEKLY(1))by_weekdayarray currently can only be a length of1- i.e: You can only select a single day within a week to have a recurring event on
- If you wish to have multiple days within a week have a recurring event, please use a
frequencyofDAILY
- Also, see
intervalbelow for “every-other” week information
by_n_weekday
- Only valid for monthly events (
frequencyofMONTHLY(1)) by_n_weekdayarray currently can only be a length of1- i.e: You can only select a single day within a month to have a recurring event on
by_month and by_month_day
- Only valid for annual event (
frequencyisYEARLY(0)) - both
by_monthandby_month_daymust be provided - both
by_monthandby_month_dayarrays must have a length of1- (i.e: You can only set a single date for annual events)
interval can only be set to a value other than 1 when frequency is set to WEEKLY (1)
- In this situation, interval can be set to
2 - This allowance enables “every-other week” events
- Due to the limitations placed on
by_weekdaythis means that if you wish to use “every-other week” functionality you can only do so for a single day.
Examples
Simple examples of some common Recurrent Rules
Examples
Simple examples of some common Recurrent Rules
Every weekdayEvery WednesdayEvery other WednesdayMonthly on the fourth WednesdayAnnually on July 24
Guild Scheduled Event Recurrence Rule - Frequency
Guild Scheduled Event Recurrence Rule - Weekday
Guild Scheduled Event Recurrence Rule - N_Weekday Structure
Guild Scheduled Event Recurrence Rule - Month
List Scheduled Events for Guild
Returns a list of guild scheduled event objects for the given guild.Query String Params
Create Guild Scheduled Event
Create a guild scheduled event in the guild. Returns a guild scheduled event object on success. Fires a Guild Scheduled Event Create Gateway event.A guild can have a maximum of 100 events with
SCHEDULED or ACTIVE status at any time.This endpoint supports the
X-Audit-Log-Reason header.JSON Params
* Optional for events with
'entity_type': EXTERNAL
** Required for events with 'entity_type': EXTERNAL
Get Guild Scheduled Event
Get a guild scheduled event. Returns a guild scheduled event object on success.Query String Params
Modify Guild Scheduled Event
Modify a guild scheduled event. Returns the modified guild scheduled event object on success. Fires a Guild Scheduled Event Update Gateway event.To start or end an event, use this endpoint to modify the event’s status field.
This endpoint supports the
X-Audit-Log-Reason header.This endpoint silently discards
entity_metadata for non-EXTERNAL events.All parameters to this endpoint are optional.
JSON Params
* If updating
entity_type to EXTERNAL:
channel_idis required and must be set to nullentity_metadatawith alocationfield must be providedscheduled_end_timemust be provided
Delete Guild Scheduled Event
Delete a guild scheduled event. Returns a204 on success. Fires a Guild Scheduled Event Delete Gateway event.
Get Guild Scheduled Event Users
Get a list of guild scheduled event users subscribed to a guild scheduled event. Returns a list of guild scheduled event user objects on success. Guild member data, if it exists, is included if thewith_member query parameter is set.
Query String Params
* Provide a user id to
before and after for pagination. Users will always be returned in ascending order by user_id. If both before and after are provided, only before is respected. Fetching users in-between before and after is not supported.
Guild Scheduled Event Status Update Automation
NOTE:status and entity_type here are expressed by name rather than their value for readability
An active scheduled event for a stage channel where all users have left the stage channel will automatically end a few minutes after the last user leaves the channel
When an event with'status': ACTIVE and 'entity_type': STAGE_INSTANCE has no users connected to the stage channel for a certain period of time (on the order of minutes), the event status will be automatically set to COMPLETED.
An active scheduled event for a voice channel where all users have left the voice channel will automatically end a few minutes after the last user leaves the channel
When an event with'status': ACTIVE and 'entity_type': VOICE has no users connected to the voice channel for a certain period of time (on the order of minutes), the event status will be automatically set to COMPLETED.
An external event will automatically begin at its scheduled start time
An event with'entity_type': EXTERNAL at its scheduled_start_time will automatically have status set to ACTIVE.
An external event will automatically end at its scheduled end time
An event with'entity_type': EXTERNAL at its scheduled_end_time will automatically have status set to COMPLETED.
Any scheduled event which has not begun after its scheduled start time will be automatically cancelled after a few hours
Any event with'status': SCHEDULED after a certain time interval (on the order of hours) beyond its scheduled_start_time will have its status automatically set to CANCELLED.
Guild Scheduled Event Permissions Requirements
NOTE:entity_type is expressed by name rather than value for readability
A user must be a member of the guild in order to access events for that guild unless the guild is public. If a guild is public, events in that guild may be visible depending on the event type and the permissions of any channels associated with the event.
Permissions for events with entity_type: STAGE_INSTANCE
The computed permissions for the user in thechannel_id associated with the event must include:
Get Permissions
VIEW_CHANNEL
Create Permissions
CREATE_EVENTSMANAGE_CHANNELSMUTE_MEMBERSMOVE_MEMBERS
Modify/Delete Permissions
- If the event was created by the current user, either
CREATE_EVENTSorMANAGE_EVENTS. Otherwise,MANAGE_EVENTS MANAGE_CHANNELSMUTE_MEMBERSMOVE_MEMBERS
Permissions for events with entity_type: VOICE
The computed permissions for the user in thechannel_id associated with the event must include:
Get Permissions
VIEW_CHANNEL
Create permissions
CREATE_EVENTSVIEW_CHANNELCONNECT
Modify/Delete Permissions
- If the event was created by the current user, either
CREATE_EVENTSorMANAGE_EVENTS. Otherwise,MANAGE_EVENTS VIEW_CHANNELCONNECT
Permissions for events with entity_type: EXTERNAL
The user’s guild-level permissions must include:Get Permissions
- No permissions required
Create permissions
CREATE_EVENTS
Modify/Delete Permissions
- If the event was created by the current user, either
CREATE_EVENTSorMANAGE_EVENTS. Otherwise,MANAGE_EVENTS