Eventos programados
Scheduled events are a way to plan and organize events in a guild. They can be associated with a stage channel, voice channel, or an external location.
Guild Scheduled Event Structure
id
snowflake
The ID of the scheduled event
guild_id
snowflake
The ID of the guild the scheduled event belongs to
channel_id 2
?snowflake
The ID of the channel in which the scheduled event will be hosted
creator_id? 1
?snowflake
The ID of the user that created the scheduled event
name
string
The name of the scheduled event (1-100 characters)
description?
?string
The description for the scheduled event (1-1000 characters)
scheduled_start_time
ISO8601 timestamp
When the scheduled event will start
scheduled_end_time 2
?ISO8601 timestamp
When the scheduled event will end
auto_start? 3
boolean
Whether the event should automatically start at the scheduled start time
entity_id
?snowflake
The ID of an entity associated with the scheduled event
user_count? 4
integer
The number of users subscribed to the scheduled event
guild_scheduled_event_exceptions
array[exception object]
Exceptions to the recurrence rule for this event
1 will be null and will not be included for events created before October 25th, 2021, when the concept of was introduced and tracked.
2 See field requirements by entity type to understand the relationship between and the following fields: , , and .
3 Only included in Gateway events. See the automations section for more info on how to determine this manually.
4 Only included when fetched from the Get Guild Scheduled Events or Get Guild Scheduled Event endpoints with set to .
{ "id": "1059954443799498922", "guild_id": "1046920999469330512", "name": "Alien meetup", "description": "Aliens only!", "channel_id": null, "creator_id": "787017887877169173", "creator": { "id": "787017887877169173", "username": "dziurwa", "avatar": "cff3479a14360e4223f151eb8ad63dec", "discriminator": "0", "public_flags": 4194560, "banner": null, "accent_color": null, "global_name": "Dziurwa", "avatar_decoration_data": null, "primary_guild": null }, "image": "4b07ee3046773e8f2c8be856a70bd1a7", "scheduled_start_time": "2023-12-31T23:00:00+00:00", "scheduled_end_time": "2024-01-01T23:00:00+00:00", "status": 1, "entity_type": 3, "entity_id": null, "recurrence_rule": null, "user_count": 7, "privacy_level": 2, "sku_ids": [], "guild_scheduled_event_exceptions": [], "entity_metadata": { "location": "somwhere in ocean" }}
Guild Scheduled Event Entity Metadata
location? 1
string
Location of the event (1-100 characters)
1 Required for events with an of .
1
SCHEDULED
The scheduled event has not started yet
2
ACTIVE
The scheduled event is currently active
3
COMPLETED 1
The scheduled event has ended
4
CANCELED 1
The scheduled event was canceled
1 Once is set to or , the can no longer be updated.
Guild Scheduled Event Entity Type
1
STAGE_INSTANCE
The scheduled event is in a stage channel
2
VOICE
The scheduled event is in a voice channel
3
EXTERNAL
The scheduled event is somewhere else™ not associated with Discord
4
PRIME_TIME
The scheduled event is a prime time event
Guild Scheduled Event Entity Type Validation
The following table shows field requirements based on current entity type.
STAGE_INSTANCE
required
null
-
VOICE
required
null
-
EXTERNAL
null
required with location
required
Discord's recurrence rule is a subset of the behaviors defined in the iCalendar RFC and implemented using Python's dateutil rrule.
Guild Scheduled Event Recurrence Rule Structure
start
ISO8601 timestamp
Starting time of the recurrence interval
end 1
?ISO8601 timestamp
Ending time of the recurrence interval
interval
integer
The spacing between the events, defined by frequency
; for example, frequency
of WEEKLY
and an interval
of 2
would be "every other week"
by_n_weekday
?array[recurrence rule - n_weekday object]
Specific days within a specific week (1-5) to recur on
by_month_day
?array[integer]
Specific dates within a month to recur on
by_year_day 1
?array[integer]
Specific days within a year to recur on (1-364)
count 1
?integer
The total amount of times that the event is allowed to recur before stopping
1 Cannot currently be set externally.
Guild Scheduled Event Recurrence Rule - Frequency
0
YEARLY
1
MONTHLY
2
WEEKLY
3
DAILY
Guild Scheduled Event Recurrence Rule - Weekday
0
MONDAY
1
TUESDAY
2
WEDNESDAY
3
THURSDAY
4
FRIDAY
5
SATURDAY
6
SUNDAY
Guild Scheduled Event Recurrence Rule - N_Weekday Structure
n
integer
The week to reoccur on (1-5)
Guild Scheduled Event Recurrence Rule - Month
1
JANUARY
2
FEBRUARY
3
MARCH
4
APRIL
5
MAY
6
JUNE
7
JULY
8
AUGUST
9
SEPTEMBER
10
OCTOBER
11
NOVEMBER
12
DECEMBER
Represents an exception to the recurrence rule for a guild scheduled event.
Guild Scheduled Event Exception Structure
event_id
snowflake
The ID of the scheduled event the exception is for
event_exception_id
snowflake
A snowflake representing when the scheduled event would have started without the exception
is_canceled
boolean
Whether the scheduled event will be skipped on this recurrence
scheduled_start_time
?ISO8601 timestamp
The scheduled event's modified start time for this recurrence
scheduled_end_time
?ISO8601 timestamp
The scheduled event's modified end time for this recurrence
Example Guild Scheduled Event Exception
{ "event_id": "1341289071875461170", "event_exception_id": "2117779587072000000", "scheduled_start_time": "2030-02-18T00:01:00+00:00", "scheduled_end_time": null, "is_canceled": false}
Represents a user's subscription to a guild scheduled event or override for a specific exception.
Guild Scheduled Event User Structure
guild_scheduled_event_id
snowflake
The ID of the scheduled event the user subscribed to
guild_scheduled_event_exception_id?
snowflake
The ID of the specific exception this subscription is for, if any
user_id
snowflake
The ID of the user that subscribed to the scheduled event
1 Only included when fetched from the Get Guild Scheduled Event Users endpoint.
Guild Scheduled Event User Response
0
UNINTERESTED
User is not interested in the occurrence
1
INTERESTED
User is interested in the event or occurrence
GET/users/@me/scheduled-events
Returns an array of guild scheduled event user objects for the current user for a given guild.
guild_ids
snowflake
The guild ID to get the subscribed scheduled events for
GET/guilds/{guild.id}/scheduled-events
Returns a list of and guild scheduled event objects for the given guild.
with_user_count?
boolean
Whether to include the of users subscribed to each event (default false)
GET/guilds/{guild.id}/scheduled-events/{guild_scheduled_event.id}
Gets a guild scheduled event. Returns a guild scheduled event object.
with_user_count?
boolean
Whether to include the of users subscribed to each event (default false)
POST/guilds/{guild.id}/scheduled-events
Creates a guild scheduled event in the guild. Returns a guild scheduled event object on success. Fires a Guild Scheduled Event Create Gateway event.
channel_id? 1
snowflake
The ID of the channel in which the scheduled event will be hosted
name
string
the name of the scheduled event
scheduled_start_time
ISO8601 timestamp
When the scheduled event will start
scheduled_end_time? 2
ISO8601 timestamp
When the scheduled event will end
description?
string
the description of the scheduled event
1 Optional for events with an of .
2 Required for events with an of .
PATCH/guilds/{guild.id}/scheduled-events/{guild_scheduled_event.id}
Modifies a guild scheduled event. Returns the modified guild scheduled event object on success. Fires a Guild Scheduled Event Update and optionally a Stage Instance Create Gateway event.
channel_id? 1
?snowflake
The ID of the channel in which the scheduled event will be hosted
name?
string
The name of the scheduled event
scheduled_start_time?
ISO8601 timestamp
When the scheduled event will start
scheduled_end_time? 1
ISO8601 timestamp
When the scheduled event will end
description?
?string
the description of the scheduled event
1 If updating to :
is required and must be set to
with a field must be provided
must be provided
2 Only the following are valid status changes:
SCHEDULED --> ACTIVE
ACTIVE --> COMPLETED
SCHEDULED --> CANCELED
DELETE/guilds/{guild.id}/scheduled-events/{guild_scheduled_event.id}
Deletes a guild scheduled event. Returns a a 204 empty response on success. Fires a Guild Scheduled Event Delete Gateway event.
POST/guilds/{guild.id}/scheduled-events/{guild_scheduled_event.id}/exceptions
Creates an exception to the recurrence rule for a guild scheduled event. Returns a guild scheduled event exception object on success. Fires a Guild Scheduled Event Exception Create Gateway event.
original_scheduled_start_time
ISO8601 timestamp
When the scheduled event would have started without the exception
is_canceled?
boolean
Whether the scheduled event will be skipped on this recurrence
scheduled_start_time?
?ISO8601 timestamp
The scheduled event's modified start time for this recurrence
scheduled_end_time?
?ISO8601 timestamp
The scheduled event's modified end time for this recurrence
PATCH/guilds/{guild.id}/scheduled-events/{guild_scheduled_event.id}/{guild_scheduled_event_exception.id}
Modifies an exception to the recurrence rule for a guild scheduled event. Returns the modified guild scheduled event exception object on success. Fires a Guild Scheduled Event Exception Create Gateway event.
is_canceled?
boolean
Whether the scheduled event will be skipped on this recurrence
scheduled_start_time?
?ISO8601 timestamp
The scheduled event's modified start time for this recurrence
scheduled_end_time?
?ISO8601 timestamp
The scheduled event's modified end time for this recurrence
DELETE/guilds/{guild.id}/scheduled-events/{guild_scheduled_event.id}/{guild_scheduled_event_exception.id}
Deletes an exception to the recurrence rule for a guild scheduled event. Returns a 204 empty response on success. Fires a Guild Scheduled Event Exception Delete Gateway event.
GET/guilds/{guild.id}/scheduled-events/{guild_scheduled_event.id}/users/count
Returns the number of users subscribed to a guild scheduled event.
guild_scheduled_event_exception_ids?
array[snowflake]
The IDs of the exceptions to return counts for (max 10)
guild_scheduled_event_count
integer
The number of users subscribed to the guild scheduled event
guild_scheduled_event_exception_counts
map[snowflake, integer]
The number of users subscribed to each exception
{ "guild_scheduled_event_count": 18, "guild_scheduled_event_exception_counts": { "1456059344486400000": 18 }}
GET/guilds/{guild.id}/scheduled-events/{guild_scheduled_event.id}/users
Returns a list of users subscribed to a guild scheduled event.
before?
snowflake
Get users before this user ID
after?
snowflake
Get users after this user ID
limit?
number
Max number of users to return (1-100, default 100)
with_member?
boolean
Whether to include possible guild member data (default false)
upgrade_response_type? 1
boolean
Whether to return the new response body format (default false)
1 This parameter is ignored for bots as they always receive the new response body format.
When is set to , the response is a list of guild scheduled event user objects.
Otherwise, the response looks like this:
users
array[partial user object]
The users subscribed to the scheduled event, with an extracontaining optional guild member data
PUT/guilds/{guild.id}/scheduled-events/{guild_scheduled_event.id}/users/@me
Subscribes the current user to a guild scheduled event. Returns a guild scheduled event user object on success. Fires a Guild Scheduled Event User Add Gateway event.
DELETE/guilds/{guild.id}/scheduled-events/{guild_scheduled_event.id}/users/@me
Unsubscribes the current user from a guild scheduled event. Returns a 204 empty response on success. Fires a Guild Scheduled Event User Remove Gateway event.
GET/guilds/{guild.id}/scheduled-events/{guild_scheduled_event.id}/{guild_scheduled_event_exception.id}/users
Returns a list of guild scheduled event user objects subscribed to a specific guild scheduled event exception.
before?
snowflake
Get users before this user ID
after?
snowflake
Get users after this user ID
limit?
number
Max number of users to return (1-100, default 100)
with_member?
boolean
Whether to include possible guild member data (default false)
PUT/guilds/{guild.id}/scheduled-events/{guild_scheduled_event.id}/{guild_scheduled_event_exception.id}/users/@me
Overrides the user's subscription to a guild scheduled event for a specific exception. Returns a subscribed guild scheduled event user object on success. Fires a Guild Scheduled Event User Add Gateway event.
DELETE/guilds/{guild.id}/scheduled-events/{guild_scheduled_event.id}/{guild_scheduled_event_exception.id}/users/@me
Removes the user's subscription override for a specific exception. Returns a 204 empty response on success. Fires a Guild Scheduled Event User Remove Gateway event.
When an event with a of and of has no users connected to the stage channel for a certain period of time (on the order of minutes), the event will be automatically set to .
When an event with a of and of has no users connected to the voice channel for a certain period of time (on the order of minutes), the event will be automatically set to .
An external event will automatically begin at its scheduled start time
An event with an of at its will automatically have set to .
An external event will automatically end at its scheduled end time
An event with an of at its will automatically have set to .
Any event with a of after a certain time interval (on the order of hours) beyond its will have its automatically set to .
Permissions to create an event with entity_type:
Write Permissions (CREATE / UPDATE)
at the guild level or at least for the associated with the event
for associated with the event
Permissions to create an event with entity_type:
Write Permissions (CREATE / UPDATE)
at the guild level or for the associated with the event
for associated with event
for associated with event
for associated with the event
Permissions to create an event with entity_type:
Write Permissions (CREATE / UPDATE)
at the guild level
No other permissions required