Skip to content

Commit 275e100

Browse files
authored
Merge branch 'main' into patch-1
2 parents b6ee5ad + 2d07527 commit 275e100

File tree

97 files changed

+2154
-942
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+2154
-942
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Buttons are simply... clickable buttons. They take `href` and `color` as argumen
8181
![Button MDX Component](images/mdx-button.png)
8282

8383
```markdown
84-
<Button href="https://discord.com/developers/docs/getting-started" color="brand">click the button!</Button>
84+
<LinkButton to="https://discord.com/developers/docs/getting-started" color="brand">click the button!</LinkButton>
8585
```
8686

8787
#### Cards

docs/Intro.mdx

Lines changed: 71 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -3,50 +3,74 @@ showTOC: false
33
sidebar_label: Intro
44
---
55

6-
![Welcome to the Discord Developer Platform](docs-header.svg)
7-
8-
# Welcome to the Discord Developer Platform
9-
10-
The Discord developer platform lets you develop apps to customize and extend Discord for millions of users. A toolkit of [APIs](#DOCS_REFERENCE) and [resources](#DOCS_DEVELOPER_TOOLS_COMMUNITY_RESOURCES) pair splendidly with a supportive community to help you build bots, integrate 3rd party services, and add Discord support to your game.
11-
12-
<Button href="https://discord.com/developers/docs/getting-started" color="brand">Get Started</Button>
13-
14-
---
15-
16-
## Explore the Platform
17-
18-
#### Engage with Users
19-
20-
Add interactivity to your app with [commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS) and [message components](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS) to build engaging experiences in the place where users are already hanging out.
21-
22-
#### Customize Servers
23-
24-
Customize Discord servers by using apps to do things like [send messages](#DOCS_RESOURCES_MESSAGE/create-message), modify [channels](#DOCS_RESOURCES_CHANNEL) and [guilds](#DOCS_RESOURCES_GUILD), [integrate with AutoMod](#DOCS_RESOURCES_AUTO_MODERATION), or [connect to voice](#DOCS_TOPICS_VOICE_CONNECTIONS).
25-
26-
Plus, use the [Gateway API](#DOCS_TOPICS_GATEWAY) to respond to [real-time events](#DOCS_TOPICS_GATEWAY_EVENTS/receive-events) happening in a server, like when a reaction is added to a message.
27-
28-
#### Connect Metadata
29-
30-
Link and update metadata to enhance Discord for users. Add [Rich Presence](#DOCS_RICH_PRESENCE_OVERVIEW) to display live data on users' profiles, or [connection metadata](#DOCS_RESOURCES_APPLICATION_ROLE_CONNECTION_METADATA) to make it easy for admins to create roles using metadata associated with your app.
31-
32-
#### Build Interactive Activities and Games
33-
34-
Currently in Developer Preview, the [Embedded App SDK](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK) allows you to build [Activities](#DOCS_ACTIVITIES_OVERVIEW), such as multiplayer games or social experiences, that run inside Discord.
35-
36-
## Discover Developer Resources
37-
38-
#### Find Tools and Libraries
39-
40-
The Discord developer community has built and maintained a ton of different [libraries and tools](#DOCS_DEVELOPER_TOOLS_COMMUNITY_RESOURCES/libraries) over the years. No matter your experience level or language of choice, there are resources to speed up and simplify app development for you over on the [Community Resources](#DOCS_DEVELOPER_TOOLS_COMMUNITY_RESOURCES) page.
41-
42-
You can also check out our [Postman collections](https://www.postman.com/discord-api) to try and test API endpoints.
43-
44-
#### Connect with Support
45-
46-
- Join the [Discord Developers server](https://discord.gg/discord-developers) for support, discussion, and events about the Discord developer platform.
47-
- Explore the [Developer Help Center](https://support-dev.discord.com/hc) to find articles about common topics and questions, or to reach directly out to our developer support team.
48-
- Use our [GitHub](https://github.com/discord/discord-api-docs) to report API bugs, start a discussion about a developer feature request, or suggest an edit to our open source developer documentation.
49-
50-
So go ahead and [build an app](https://discord.com/developers/applications)! We can’t wait to see what you make.
51-
52-
— Discord
6+
<Hero title="Build Where the World Plays" subheading="Build social games, experiences, and integrations for millions of users on Discord" />
7+
8+
## Get Started
9+
10+
Learn more about what apps can do on Discord or jump right into building your own.
11+
12+
<Container>
13+
<Card title="Overview of Apps" link="#DOCS_QUICK_START_OVERVIEW_OF_APPS" icon="AppsIcon">
14+
Learn more about the different types of apps you can build on Discord and how users can interact with them
15+
</Card>
16+
<Card title="Build your First Discord App" link="#DOCS_QUICK_START_GETTING_STARTED" icon="RobotIcon">
17+
Follow the guide to build a Discord app with interactive features like commands and message components.
18+
</Card>
19+
<Card title="Build a Discord Activity" link="#DOCS_ACTIVITIES_BUILDING_AN_ACTIVITY" icon="GameControllerIcon">
20+
Follow the guide to build an Activity in Discord using the Embedded App SDK.
21+
</Card>
22+
</Container>
23+
24+
## Discover Platform Features
25+
26+
Learn about different features and explore their reference documentation to bring your idea to life.
27+
28+
<Container>
29+
<Card title="Messaging" link="#DOCS_RESOURCES_MESSAGE" icon="ChatIcon">
30+
Send, retrieve, and manage messages in channels where your app has access.
31+
</Card>
32+
<Card title="Message Components" link="#DOCS_INTERACTIONS_OVERVIEW/message-components" icon="SparklesIcon">
33+
Add interactive elements like buttons and select menus in messages sent by your app.
34+
</Card>
35+
<Card title="Commands" link="#DOCS_INTERACTIONS_OVERVIEW/commands" icon="SlashBoxIcon">
36+
Create interactive entry points for your app's features that can be accessed across Discord.
37+
</Card>
38+
<Card title="Activities" link="#DOCS_ACTIVITIES_OVERVIEW" icon="GameControllerIcon">
39+
Build embedded games and social experiences that are launchable in Discord.
40+
</Card>
41+
<Card title="Monetization" link="#DOCS_MONETIZATION_OVERVIEW" icon="PiggyBankIcon">
42+
Integrate native monetization features like subscriptions and one-time purchases.
43+
</Card>
44+
<Card title="Rich Presence" link="#DOCS_RICH_PRESENCE_OVERVIEW" icon="UserIcon">
45+
Display actionable data in a user's profile about what they're doing in your game or app.
46+
</Card>
47+
</Container>
48+
49+
## Explore the APIs
50+
51+
Learn about some of the different APIs Discord apps have access to.
52+
53+
<Container>
54+
<Card title="HTTP API" link="#DOCS_REFERENCE/http-api">
55+
Fetch information about and modify core Discord resources like channels, servers, users, and messages.
56+
</Card>
57+
<Card title="Gateway API" link="#DOCS_REFERENCE/gateway-websocket-api" >
58+
Receive and send realtime events over a WebSocket connection for things happening in Discord.
59+
</Card>
60+
</Container>
61+
62+
## Find Support
63+
64+
Reach out to the community or developer support to get support and stay updated about API changes.
65+
66+
<Container>
67+
<Card title="Discord Developer Server" link="https://discord.gg/discord-developers" icon="ClydeIcon">
68+
Join our community for support, API announcements, and events hosted by Discord staff.
69+
</Card>
70+
<Card title="Find us on GitHub" link="https://github.com/discord/discord-api-docs" icon="ForumIcon">
71+
Visit us on GitHub to report API bugs, provide platform feature requests, or to suggest updates to the documentation.
72+
</Card>
73+
<Card title="Developer Help Center" link="https://support-dev.discord.com" icon="UnknownGameIcon">
74+
Find articles on common topics and questions, or reach directly out to the developer support team.
75+
</Card>
76+
</Container>

docs/Reference.mdx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ All HTTP-layer services and protocols (e.g. HTTP, WebSocket) within the Discord
126126

127127
## Snowflakes
128128

129-
Discord utilizes Twitter's [snowflake](https://github.com/twitter-archive/snowflake/tree/snowflake-2010) format for uniquely identifiable descriptors (IDs). These IDs are guaranteed to be unique across all of Discord, except in some unique scenarios in which child objects share their parent's ID. Because Snowflake IDs are up to 64 bits in size (e.g. a uint64), they are always returned as strings in the HTTP API to prevent integer overflows in some languages. See [Gateway ETF/JSON](#DOCS_TOPICS_GATEWAY/encoding-and-compression) for more information regarding Gateway encoding.
129+
Discord utilizes Twitter's [snowflake](https://github.com/twitter-archive/snowflake/tree/snowflake-2010) format for uniquely identifiable descriptors (IDs). These IDs are guaranteed to be unique across all of Discord, except in some unique scenarios in which child objects share their parent's ID. Because Snowflake IDs are up to 64 bits in size (e.g. a uint64), they are always returned as strings in the HTTP API to prevent integer overflows in some languages. See [Gateway ETF/JSON](#DOCS_EVENTS_GATEWAY/encoding-and-compression) for more information regarding Gateway encoding.
130130

131131
###### Snowflake ID Broken Down in Binary
132132

@@ -235,6 +235,10 @@ Clients may append more information and metadata to the _end_ of this string as
235235
> warn
236236
> Client requests that do not have a valid User Agent specified may be blocked and return a [Cloudflare error](https://support.cloudflare.com/hc/en-us/articles/360029779472-Troubleshooting-Cloudflare-1XXX-errors).
237237
238+
### Content Type
239+
240+
Clients using the HTTP API must provide a valid `Content-Type` header, either `application/json`, `application/x-www-form-urlencoded`, or `multipart/form-data`, except where specified. Failing to do so will result in a `50035` "Invalid form body" error.
241+
238242
### Rate Limiting
239243

240244
The HTTP API implements a process for limiting and preventing excessive requests in accordance with [RFC 6585](https://tools.ietf.org/html/rfc6585#section-4). API users that regularly hit and ignore rate limits will have their API keys revoked, and be blocked from the platform. For more information on rate limiting of requests, please see the [Rate Limits](#DOCS_TOPICS_RATE_LIMITS/rate-limits) section.
@@ -245,7 +249,7 @@ Certain endpoints in the API are documented to accept booleans for their query s
245249

246250
## Gateway (WebSocket) API
247251

248-
Discord's Gateway API is used for maintaining persistent, stateful websocket connections between your client and our servers. These connections are used for sending and receiving real-time events your client can use to track and update local state. The Gateway API uses secure websocket connections as specified in [RFC 6455](https://tools.ietf.org/html/rfc6455). For information on opening Gateway connections, please see the [Gateway API](#DOCS_TOPICS_GATEWAY/connections) section.
252+
Discord's Gateway API is used for maintaining persistent, stateful websocket connections between your client and our servers. These connections are used for sending and receiving real-time events your client can use to track and update local state. The Gateway API uses secure websocket connections as specified in [RFC 6455](https://tools.ietf.org/html/rfc6455). For information on opening Gateway connections, please see the [Gateway API](#DOCS_EVENTS_GATEWAY/connections) section.
249253

250254
## Message Formatting
251255

@@ -337,7 +341,7 @@ Discord uses ids and hashes to render images in the client. These hashes can be
337341
| Avatar Decoration | avatar-decoration-presets/[avatar_decoration_data_asset](#DOCS_RESOURCES_USER/avatar-decoration-data-object).png | PNG |
338342
| Application Icon | app-icons/[application_id](#DOCS_RESOURCES_APPLICATION/application-object)/[icon](#DOCS_RESOURCES_APPLICATION/application-object).png | PNG, JPEG, WebP |
339343
| Application Cover | app-icons/[application_id](#DOCS_RESOURCES_APPLICATION/application-object)/[cover_image](#DOCS_RESOURCES_APPLICATION/application-object).png | PNG, JPEG, WebP |
340-
| Application Asset | app-assets/[application_id](#DOCS_RESOURCES_APPLICATION/application-object)/[asset_id](#DOCS_TOPICS_GATEWAY_EVENTS/activity-object-activity-assets).png | PNG, JPEG, WebP |
344+
| Application Asset | app-assets/[application_id](#DOCS_RESOURCES_APPLICATION/application-object)/[asset_id](#DOCS_EVENTS_GATEWAY_EVENTS/activity-object-activity-assets).png | PNG, JPEG, WebP |
341345
| Achievement Icon | app-assets/[application_id](#DOCS_RESOURCES_APPLICATION/application-object)/achievements/[achievement_id](https://github.com/discord/discord-api-docs/blob/legacy-gamesdk/docs/game_sdk/Achievements.md#user-achievement-struct)/icons/[icon_hash](https://github.com/discord/discord-api-docs/blob/legacy-gamesdk/docs/game_sdk/Achievements.md#user-achievement-struct).png | PNG, JPEG, WebP |
342346
| Store Page Asset | app-assets/[application_id](#DOCS_RESOURCES_APPLICATION/application-object)/store/asset_id | PNG, JPEG, WebP |
343347
| Sticker Pack Banner | app-assets/710982414301790216/store/[sticker_pack_banner_asset_id](#DOCS_RESOURCES_STICKER/sticker-pack-object).png | PNG, JPEG, WebP |
@@ -393,7 +397,7 @@ https://cdn.discordapp.com/attachments/1012345678900020080/1234567891233211234/m
393397
## Uploading Files
394398

395399
> info
396-
> A file upload size limit applies to *all* files in a request (rather than each individual file). While the limit depends on the [**Boost Tier**](https://support.discord.com/hc/en-us/articles/360028038352-Server-Boosting-FAQ-#h_419c3bd5-addd-4989-b7cf-c7957ef92583) of a guild, it is `25 MiB` by default.
400+
> A file upload size limit applies to *all* files in a request (rather than each individual file). While the limit depends on the [**Boost Tier**](https://support.discord.com/hc/en-us/articles/360028038352-Server-Boosting-FAQ-#h_419c3bd5-addd-4989-b7cf-c7957ef92583) of a guild, it is `10 MiB` by default.
397401
398402
Some endpoints support file attachments, indicated by the `files[n]` parameter. To add file(s), the standard `application/json` body must be replaced by a `multipart/form-data` body. The JSON message body can optionally be provided using the `payload_json` parameter.
399403

0 commit comments

Comments
 (0)