Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document Guild Scheduled Event structure and HTTP methods #3586

Merged
merged 44 commits into from
Nov 15, 2021
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
4235bc5
Update Guild.md
apacheli Aug 4, 2021
b7b5295
move to Stage_Instance.md
apacheli Aug 5, 2021
d9f6daa
Update docs/resources/Stage_Instance.md
apacheli Aug 5, 2021
c5e4ad2
Update docs/resources/Stage_Instance.md
apacheli Aug 5, 2021
0574af0
fixes + metadata + more POST data
apacheli Aug 5, 2021
3251a74
privacy level
apacheli Aug 6, 2021
82690ab
Update docs/resources/Stage_Instance.md
apacheli Aug 6, 2021
27c37ac
move to Guild_Event.md
apacheli Aug 6, 2021
82a21fe
add guild-events endpoints
apacheli Aug 6, 2021
6a38003
tweaks
apacheli Aug 6, 2021
9d13bc0
entity type
apacheli Aug 6, 2021
a0ca171
event status enum
apacheli Aug 6, 2021
6c37b63
fix review problems
apacheli Aug 22, 2021
180085b
missed this one oops
apacheli Aug 22, 2021
57712e8
MANAGE_EVENTS permission
apacheli Aug 22, 2021
3c30ad7
audit log events
apacheli Aug 24, 2021
17b60f3
gateway websocket events
apacheli Aug 24, 2021
1b7587f
audit log change keys
apacheli Aug 24, 2021
6fcfe71
say inner payload
apacheli Aug 25, 2021
65c0f6b
fix these ones too
apacheli Aug 25, 2021
74cde21
array of snowflakes
apacheli Aug 26, 2021
1918011
Update docs/resources/Guild_Event.md
apacheli Aug 29, 2021
3172122
Update docs/resources/Guild_Event.md
apacheli Aug 29, 2021
931af0b
Update docs/resources/Guild_Event.md
apacheli Aug 29, 2021
de0a208
forgot to commit this one lol
apacheli Sep 1, 2021
ca59e28
GUILD_SCHEDULED_EVENT_USER_*
apacheli Sep 3, 2021
1836db8
Merge branch 'yes' of https://github.com/apacheli/discord-api-docs in…
apacheli Sep 3, 2021
02fd66d
extra notes
apacheli Sep 3, 2021
4c957f5
Update docs/topics/Permissions.md
apacheli Sep 17, 2021
c5d175c
rename to Guild Scheduled Event
apacheli Sep 17, 2021
d51d16a
BREAKING: rename to Guild Scheduled Event
apacheli Sep 17, 2021
c6fe790
new query for invites
apacheli Sep 17, 2021
2abad30
Merge branch 'master' into yes
apacheli Nov 2, 2021
bc9fcc7
creator and creator_id
apacheli Nov 2, 2021
b12c4b6
fix links action
apacheli Nov 2, 2021
9c69a52
missed an anchor
apacheli Nov 2, 2021
a1150ae
BREAKING: reflect new changes
apacheli Nov 14, 2021
5244c36
fix ci issues
apacheli Nov 14, 2021
d3fb801
fix endpoint hyperlinks
apacheli Nov 14, 2021
980a3e0
change entity type LOCATION to EXTERNAL
hemu Nov 14, 2021
645ade4
update guild scheduled event, audit log, invite, and gateway
hemu Nov 15, 2021
60566a5
cleanup Guild Scheduled Event
hemu Nov 15, 2021
c626b86
guild scheduled event cleanup, remove image field
hemu Nov 15, 2021
90e31bd
audit log cleanup, add channel types to permissions
hemu Nov 15, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 52 additions & 46 deletions docs/resources/Audit_Log.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,52 +48,55 @@ Whenever an admin action is performed on the API, an entry is added to the respe

###### Audit Log Events

| Event | Value |
| ------------------------ | ----- |
| GUILD_UPDATE | 1 |
| CHANNEL_CREATE | 10 |
| CHANNEL_UPDATE | 11 |
| CHANNEL_DELETE | 12 |
| CHANNEL_OVERWRITE_CREATE | 13 |
| CHANNEL_OVERWRITE_UPDATE | 14 |
| CHANNEL_OVERWRITE_DELETE | 15 |
| MEMBER_KICK | 20 |
| MEMBER_PRUNE | 21 |
| MEMBER_BAN_ADD | 22 |
| MEMBER_BAN_REMOVE | 23 |
| MEMBER_UPDATE | 24 |
| MEMBER_ROLE_UPDATE | 25 |
| MEMBER_MOVE | 26 |
| MEMBER_DISCONNECT | 27 |
| BOT_ADD | 28 |
| ROLE_CREATE | 30 |
| ROLE_UPDATE | 31 |
| ROLE_DELETE | 32 |
| INVITE_CREATE | 40 |
| INVITE_UPDATE | 41 |
| INVITE_DELETE | 42 |
| WEBHOOK_CREATE | 50 |
| WEBHOOK_UPDATE | 51 |
| WEBHOOK_DELETE | 52 |
| EMOJI_CREATE | 60 |
| EMOJI_UPDATE | 61 |
| EMOJI_DELETE | 62 |
| MESSAGE_DELETE | 72 |
| MESSAGE_BULK_DELETE | 73 |
| MESSAGE_PIN | 74 |
| MESSAGE_UNPIN | 75 |
| INTEGRATION_CREATE | 80 |
| INTEGRATION_UPDATE | 81 |
| INTEGRATION_DELETE | 82 |
| STAGE_INSTANCE_CREATE | 83 |
| STAGE_INSTANCE_UPDATE | 84 |
| STAGE_INSTANCE_DELETE | 85 |
| STICKER_CREATE | 90 |
| STICKER_UPDATE | 91 |
| STICKER_DELETE | 92 |
| THREAD_CREATE | 110 |
| THREAD_UPDATE | 111 |
| THREAD_DELETE | 112 |
| Event | Value |
| ---------------------------- | ----- |
| GUILD_UPDATE | 1 |
| CHANNEL_CREATE | 10 |
| CHANNEL_UPDATE | 11 |
| CHANNEL_DELETE | 12 |
| CHANNEL_OVERWRITE_CREATE | 13 |
| CHANNEL_OVERWRITE_UPDATE | 14 |
| CHANNEL_OVERWRITE_DELETE | 15 |
| MEMBER_KICK | 20 |
| MEMBER_PRUNE | 21 |
| MEMBER_BAN_ADD | 22 |
| MEMBER_BAN_REMOVE | 23 |
| MEMBER_UPDATE | 24 |
| MEMBER_ROLE_UPDATE | 25 |
| MEMBER_MOVE | 26 |
| MEMBER_DISCONNECT | 27 |
| BOT_ADD | 28 |
| ROLE_CREATE | 30 |
| ROLE_UPDATE | 31 |
| ROLE_DELETE | 32 |
| INVITE_CREATE | 40 |
| INVITE_UPDATE | 41 |
| INVITE_DELETE | 42 |
| WEBHOOK_CREATE | 50 |
| WEBHOOK_UPDATE | 51 |
| WEBHOOK_DELETE | 52 |
| EMOJI_CREATE | 60 |
| EMOJI_UPDATE | 61 |
| EMOJI_DELETE | 62 |
| MESSAGE_DELETE | 72 |
| MESSAGE_BULK_DELETE | 73 |
| MESSAGE_PIN | 74 |
| MESSAGE_UNPIN | 75 |
| INTEGRATION_CREATE | 80 |
| INTEGRATION_UPDATE | 81 |
| INTEGRATION_DELETE | 82 |
| STAGE_INSTANCE_CREATE | 83 |
| STAGE_INSTANCE_UPDATE | 84 |
| STAGE_INSTANCE_DELETE | 85 |
| STICKER_CREATE | 90 |
| STICKER_UPDATE | 91 |
| STICKER_DELETE | 92 |
| GUILD_SCHEDULED_EVENT_CREATE | 100 |
| GUILD_SCHEDULED_EVENT_UPDATE | 101 |
| GUILD_SCHEDULED_EVENT_DELETE | 102 |
| THREAD_CREATE | 110 |
| THREAD_UPDATE | 111 |
| THREAD_DELETE | 112 |

###### Optional Audit Entry Info

Expand Down Expand Up @@ -189,6 +192,9 @@ Whenever an admin action is performed on the API, an entry is added to the respe
| locked | [thread](#DOCS_RESOURCES_CHANNEL/thread-metadata-object) | bool | thread is now locked/unlocked |
| auto_archive_duration | [thread](#DOCS_RESOURCES_CHANNEL/thread-metadata-object) | integer | auto archive duration changed |
| default_auto_archive_duration | [channel](#DOCS_RESOURCES_CHANNEL/channel) | integer | default auto archive duration for newly created threads changed |
| entity_type | [guild event](#DOCS_RESOURCES_GUILD_EVENT/guild-event-object) | integer | entity type of guild scheduled event was changed |
| status | [guild event](#DOCS_RESOURCES_GUILD_EVENT/guild-event-object) | integer | status of guild scheduled event was changed |
| sku_ids | [guild event](#DOCS_RESOURCES_GUILD_EVENT/guild-event-object) | array | the skus of a guild event was changed |
apacheli marked this conversation as resolved.
Show resolved Hide resolved

###### Example Partial Role Object

Expand Down
101 changes: 101 additions & 0 deletions docs/resources/Guild_Event.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Guild Event

A representation of an event in a Guild.

### Guild Event Object

###### Guild Event Structure

| Field | Type | Description |
| -------------------- | ---------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| id | snowflake | the id of the event |
| guild_id | snowflake | the guild id of the event |
| channel_id | ?snowflake | the stage channel id of the event |
apacheli marked this conversation as resolved.
Show resolved Hide resolved
| name | string | the name of the event |
| description? | string | the description of the event |
| image | ?string | the image of the event |
| scheduled_start_time | ISO8601 | the time the event will start |
| scheduled_end_time | ?ISO8601 | the time the event will end, or `null` if the event does not have a scheduled time to end |
| privacy_level | [privacy level](#DOCS_RESOURCES_STAGE_INSTANCE/stage-instance-object-privacy-level) | event privacy level |
| status | [event status](#DOCS_RESOURCES_GUILD_EVENT/guild-event-object-guild-scheduled-event-status) | the scheduled status of the event |
apacheli marked this conversation as resolved.
Show resolved Hide resolved
| entity_type | [scheduled entity type](#DOCS_RESOURCES_GUILD_EVENT/guild-event-object-guild-scheduled-event-entity-types) | the scheduled entity type of the event |
apacheli marked this conversation as resolved.
Show resolved Hide resolved
| entity_id | ?snowflake | entity id |
| entity_metadata | [entity metadata](#DOCS_RESOURCES_GUILD_EVENT/guild-event-object-guild-event-entity-metadata) | metadata for the event |
| sku_ids | array of snowflakes | sku ids |
| skus | array | skus |
| user_count? | integer | users subscribed to the event |

###### Guild Scheduled Event Entity Types
apacheli marked this conversation as resolved.
Show resolved Hide resolved

| Type | Value |
| -------------- | ----- |
| NONE | 0 |
| STAGE_INSTANCE | 1 |
| VOICE | 2 |
| EXTERNAL | 3 |

###### Guild Scheduled Event Status
apacheli marked this conversation as resolved.
Show resolved Hide resolved

| Type | Value |
| --------- | ----- |
| SCHEDULED | 1 |
| ACTIVE | 2 |
| COMPLETED | 3 |
| CANCELED | 4 |

###### Guild Event Entity Metadata

| Field | Type | Description |
| ------------ | ------------------- | --------------------------------- |
| speaker_ids? | array of snowflakes | the speakers of the stage channel |

apacheli marked this conversation as resolved.
Show resolved Hide resolved
## List Guild Events for Guild % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/events

Returns a list of [Guild Events](#DOCS_RESOURCES_GUILD_EVENT/guild-event-object) in the guild.

###### Query String Params

| Field | Type | Description |
| ---------------- | ------- | ----------------------------- |
| with_user_count? | boolean | users subscribed to the event |

## Create Guild Event % POST /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/events

Create a Guild Event in the guild. Returns a [Guild Event](#DOCS_RESOURCES_GUILD_EVENT/guild-event-object) object on success.

###### JSON Params

| Field | Type | Description |
| -------------------- | ---------------------------------------------------------------------------------------------------------- | -------------------------------------- |
| channel_id? | snowflake | the stage channel id of the event |
apacheli marked this conversation as resolved.
Show resolved Hide resolved
| name | string | the name of the event |
| privacy_level | [privacy level](#DOCS_RESOURCES_STAGE_INSTANCE/stage-instance-object-privacy-level) | the privacy level of the event |
| scheduled_start_time | ISO8601 | the time to schedule the event |
| description? | string | the description of the event |
| entity_type | [scheduled entity type](#DOCS_RESOURCES_GUILD_EVENT/guild-event-object-guild-scheduled-event-entity-types) | the scheduled entity type of the event |

## Get Guild Event % GET /guild-events/{event.id#DOCS_RESOURCES_GUILD_EVENT/guild-event-object}

Get a Guild Event. Returns a [Guild Event](#DOCS_RESOURCES_GUILD_EVENT/guild-event-object) object on success.

## Delete Guild Event % DELETE /guild-events/{event.id#DOCS_RESOURCES_GUILD_EVENT/guild-event-object}

Delete a Guild Event.

## Modify Guild Event % PATCH /guild-events/{event.id#DOCS_RESOURCES_GUILD_EVENT/guild-event-object}

Modify a Guild Event. Returns the modified [Guild Event](#DOCS_RESOURCES_GUILD_EVENT/guild-event-object) object on success.

> info
> All parameters to this endpoint are optional

###### JSON Params

| Field | Type | Description |
| -------------------- | ---------------------------------------------------------------------------------------------------------- | -------------------------------------- |
| channel_id | snowflake | the stage channel id of the event |
apacheli marked this conversation as resolved.
Show resolved Hide resolved
| name | string | the name of the event |
| privacy_level | [privacy level](#DOCS_RESOURCES_STAGE_INSTANCE/stage-instance-object-privacy-level) | the privacy level of the event |
| scheduled_start_time | ISO8601 | the time to schedule the event |
| description | string | the description of the event |
| entity_type | [scheduled entity type](#DOCS_RESOURCES_GUILD_EVENT/guild-event-object-guild-scheduled-event-entity-types) | the scheduled entity type of the event |
15 changes: 15 additions & 0 deletions docs/topics/Gateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,9 @@ Events are payloads sent over the socket to a client that correspond to events i
| [Guild Role Create](#DOCS_TOPICS_GATEWAY/guild-role-create) | guild role was created |
| [Guild Role Update](#DOCS_TOPICS_GATEWAY/guild-role-update) | guild role was updated |
| [Guild Role Delete](#DOCS_TOPICS_GATEWAY/guild-role-delete) | guild role was deleted |
| [Guild Scheduled Event Create](#DOCS_TOPIC_GATEWAY/guild-scheduled-event-create) | guild event was created |
| [Guild Scheduled Event Update](#DOCS_TOPIC_GATEWAY/guild-scheduled-event-update) | guild event was updated |
| [Guild Scheduled Event Delete](#DOCS_TOPIC_GATEWAY/guild-scheduled-event-delete) | guild event was deleted |
| [Integration Create](#DOCS_TOPICS_GATEWAY/integration-create) | guild integration was created |
| [Integration Update](#DOCS_TOPICS_GATEWAY/integration-update) | guild integration was updated |
| [Integration Delete](#DOCS_TOPICS_GATEWAY/integration-delete) | guild integration was deleted |
Expand Down Expand Up @@ -1053,6 +1056,18 @@ Sent when a guild role is deleted.
| guild_id | snowflake | id of the guild |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| guild_id | snowflake | id of the guild |
| guild_id | snowflake | ID of the guild |

| role_id | snowflake | id of the role |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| role_id | snowflake | id of the role |
| role_id | snowflake | ID of the role |


### Guild Scheduled Event Create

Sent when a guild event is created. The data contain a [Guild Event](#DOCS_RESOURCES_GUILD_EVENT/guild-event-object) object.
apacheli marked this conversation as resolved.
Show resolved Hide resolved

### Guild Scheduled Event Update

Sent when a guild event is updated. The data contain a [Guild Event](#DOCS_RESOURCES_GUILD_EVENT/guild-event-object) object.

### Guild Scheduled Event Delete

Sent when a guild event is deleted. The data contain a [Guild Event](#DOCS_RESOURCES_GUILD_EVENT/guild-event-object) object.

### Integrations

#### Integration Create
Expand Down
1 change: 1 addition & 0 deletions docs/topics/Permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Below is a table of all current permissions, their integer values in hexadecimal
| MANAGE_EMOJIS_AND_STICKERS \* | `0x0040000000` `(1 << 30)` | Allows management and editing of emojis and stickers | |
| USE_SLASH_COMMANDS | `0x0080000000` `(1 << 31)` | Allows members to use slash commands in text channels | T |
| REQUEST_TO_SPEAK | `0x0100000000` `(1 << 32)` | Allows for requesting to speak in stage channels. (_This permission is under active development and may be changed or removed._) | S |
| MANAGE_EVENTS | `0x0200000000` `(1 << 33)` | Allows for creating and deleting events | |
apacheli marked this conversation as resolved.
Show resolved Hide resolved
| MANAGE_THREADS \* | `0x0400000000` `(1 << 34)` | Allows for deleting and archiving threads, and viewing all private threads | T |
| USE_PUBLIC_THREADS | `0x0800000000` `(1 << 35)` | Allows for creating and participating in threads | T |
| USE_PRIVATE_THREADS | `0x1000000000` `(1 << 36)` | Allows for creating and participating in private threads | T |
Expand Down