Entradas del directorio
A directory in Discord is a special type of channel that contains a list of directory entries, which are guilds and scheduled events that have been added and made discoverable by the community. Any user that can access a directory can view the entries and join the guilds.
Directories are most commonly found in student hubs.
Directory Entry Object
Directory Entry Structure
| Field | Type | Description | | -------------------------- | ------------------------------------------------------------------------------------ | -------------------------------------------------------- | | type | integer | The type of directory entry | | directory_channel_id | snowflake | The ID of the directory channel that the entry is in | | entity_id | snowflake | The ID of the guild or scheduled event | | created_at | string | When the entry was created | | primary_category_id? | integer | The primary category of the entry | | description | ?string | The description of the entry | | author_id | snowflake | The ID of the user that created the entry | | guild? ^1^ | directory guild object | The guild entry | | guild_scheduled_event? ^1^ | directory guild scheduled event object | The guild scheduled event entry |
^1^ Not included when fetched from Get Partial Directory Entries.
Directory Guild Structure
This object is a partial guild object with the following additional fields:
| Field | Type | Description | | ----------------------- | ------- | ------------------------------------------------------------- | | featurable_in_directory | boolean | Whether the guild is eligible to be featured in the directory |
Directory Guild Scheduled Event Structure
This object is a guild scheduled event object with the following additional fields:
| Field | Type | Description | | ---------- | ----------------------------------------------------- | ---------------------------------------- | | guild | partial guild object | The guild that the event is for | | user_rsvp? | boolean | Whether the user has RSVP'd to the event |
Directory Entry Type
| Value | Name | Description | | ----- | --------------------- | ----------------- | | 0 | GUILD | A guild | | 1 | GUILD_SCHEDULED_EVENT | A scheduled event |
Directory Category
| Value | Name | Description | | ----- | ----------------- | --------------------------- | | 0 | UNCATEGORIZED | Uncategorized entry | | 1 | SCHOOL_CLUB | School club or organization | | 2 | CLASS | Class or subject | | 3 | STUDY_SOCIAL | Study or social group | | ~~4~~ | ~~SUBJECT_MAJOR~~ | ~~For a subject or major~~ | | 5 | MISC | Miscellaneous entry |
Endpoints
📋 HEADER: Get Directory Counts
Returns a mapping of directory categories to their entry count in the given directory channel. Requires the VIEW_CHANNEL
permission.
📋 HEADER: Get Directory Entries
Returns a list of directory entry objects in the given directory channel. Requires the VIEW_CHANNEL
permission.
Query String Parameters
| Field | Type | Description | | ------------ | ------- | ----------------------------------------------------------------- | | type? | integer | The type of directory entry to filter by | | category_id? | integer | The primary category to filter by |
📋 HEADER: Get Partial Directory Entries
Returns a list of partial directory entry objects in the given directory channel. Requires the VIEW_CHANNEL
permission.
Query String Parameters
| Field | Type | Description | | ----------- | ---------------- | ------------------------------------------------------ | | entity_ids? | array[snowflake] | The IDs of the directory entries to retrieve (max 100) |
📋 HEADER: Search Directory Entries
Returns a list of directory entry objects in the given directory channel that match the query. Requires the VIEW_CHANNEL
permission.
Query String Parameters
| Field | Type | Description | | ------------ | ------- | ----------------------------------------------------------------- | | query | string | The query to search for (1-100 characters) | | type? | integer | The type of directory entry to filter by | | category_id? | integer | The primary category to filter by |
📋 HEADER: Get Directory Entry
Returns a directory entry object for the given entity ID in the directory channel. Requires the VIEW_CHANNEL
permission.
📋 HEADER: Create Directory Entry
Creates a new directory entry in the given directory channel. Requires the VIEW_CHANNEL
permission and the MANAGE_GUILD
permission on the entity being added. Returns the new directory entry object on success. Fires a Guild Directory Entry Create Gateway event.
JSON Params
| Field | Type | Description | | -------------------- | ------- | ---------------------------------------------------------------------------------- | | type? | integer | The type of directory entry to create (default GUILD
) | | primary_category_id? | integer | The primary category of the entry (default UNCATEGORIZED
) | | description? | ?string | The description of the entry (max 200 characters) |
📋 HEADER: Modify Directory Entry
Modifies an existing directory entry in the given directory channel. Requires the VIEW_CHANNEL
permission and the MANAGE_GUILD
permission on the entity being modified. Returns the updated directory entry object on success. Fires a Guild Directory Entry Update Gateway event.
JSON Params
| Field | Type | Description | | -------------------- | ------- | -------------------------------------------------------- | | primary_category_id? | integer | The primary category of the entry | | description? | string | The description of the entry (max 200 characters) |
📋 HEADER: Delete Directory Entry
Deletes a directory entry in the given directory channel. Requires the VIEW_CHANNEL
permission and the MANAGE_GUILD
permission on the entity being deleted. Returns a 204 empty response on success. Fires a Guild Directory Entry Delete Gateway event.
📋 HEADER: Get Directory Broadcast Info
Returns the broadcast information for the given guild and directory entry type. User must be a member of the guild.
Query String Parameters
| Field | Type | Description | | ---------- | ------- | ------------------------------------------------------------------------------ | | type | integer | The type of directory entry to get broadcast info for | | entity_id? | integer | The ID of the directory entry to get broadcast info for |
Response Body
| Field | Type | Description | | ------------------ | ------- | ----------------------------------------------------------------- | | can_broadcast | boolean | Whether the user can broadcast in any linked directory channels | | has_broadcast? ^1^ | boolean | Whether the entity has been broadcasted in any directory channels |
^1^ Only included when entity_id
is provided.