Skip to content

Commit f3acede

Browse files
committed
fix links
1 parent f2cd841 commit f3acede

11 files changed

+37
-39
lines changed

docs/activities/building-an-activity.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ Back in your app's settings, click on the **URL Mappings** page under **Activiti
316316
|--------|-----------------------------------------|
317317
| `/` | `funky-jogging-bunny.trycloudflare.com` |
318318
319-
Read details about URL Mapping [in the development guide](/docs/activities/development-guides#url-mapping).
319+
Read details about URL Mapping [in the development guide](/docs/activities/development-guides/local-development#url-mapping).
320320
321321
### Enable Activities
322322
@@ -330,7 +330,7 @@ Find the first checkbox, labeled `Enable Activities`. Turn it on 🎉
330330
331331
When you enable Activities for your app, a [default Entry Point command](/docs/interactions/application-commands#default-entry-point-command) called "Launch" is automatically created. This [Entry Point command](/docs/interactions/application-commands#entry-point-commands) is the primary way for users to launch your Activity in Discord.
332332
333-
By default, interactions with this command will result in Discord opening your Activity for the user and posting a message in the channel where it was launched from. However, if you prefer to handle the interactions in your app, you can update the [`handler` field](/docs/interactions/application-commands#entry-point-handlers) or create your own. Additional details are in the Entry Point command [documentation](/docs/interactions/application-commands#entry-point-commands) and [development guide](/docs/activities/development-guides#setting-up-an-entry-point-command).
333+
By default, interactions with this command will result in Discord opening your Activity for the user and posting a message in the channel where it was launched from. However, if you prefer to handle the interactions in your app, you can update the [`handler` field](/docs/interactions/application-commands#entry-point-handlers) or create your own. Additional details are in the Entry Point command [documentation](/docs/interactions/application-commands#entry-point-commands) and [development guide](/docs/activities/development-guides/user-actions#setting-up-an-entry-point-command).
334334
335335
336336
### Running your Activity in Discord
@@ -346,7 +346,7 @@ Clicking on your app will launch your locally running app from inside Discord!
346346
:::info
347347
**Customizing your Activity**
348348
349-
If you'd like to set images for your Activity, you can learn how to do that [here](/docs/activities/development-guides#setting-up-activity-metadata).
349+
If you'd like to set images for your Activity, you can learn how to do that [here](/docs/activities/development-guides/assets-and-metadata#setting-up-activity-metadata).
350350
:::
351351
352352
We're looking pretty good so far, but we haven't wired up any Discord functionality yet. Let's do that next.
@@ -461,7 +461,7 @@ Before we call your backend activity server, we need to be aware of the Discord
461461
For this tutorial, we are going to prefix the API call to `/api/token/` with `/.proxy`, but you can also use the SDK's `patchUrlMappings()` method to automatically prefix calls to your external resources for the proxy.
462462
:::
463463
464-
Learn more about this topic in the guides for [Constructing a Full URL](/docs/activities/development-guides#construct-a-full-url) and [Using External Resources](/docs/activities/development-guides#using-external-resources).
464+
Learn more about this topic in the guides for [Constructing a Full URL](/docs/activities/development-guides/networking#construct-a-full-url) and [Using External Resources](/docs/activities/development-guides/networking#using-external-resources).
465465
466466
### Calling your backend server from your client
467467
@@ -515,7 +515,7 @@ async function setupDiscordSdk() {
515515
// Retrieve an access_token from your activity's server
516516
// Note: We need to prefix our backend `/api/token` route with `/.proxy` to stay compliant with the CSP.
517517
// Read more about constructing a full URL and using external resources at
518-
// https://discord.com/developers/docs/activities/development-guides#construct-a-full-url
518+
// https://discord.com/developers/docs/activities/development-guides/networking#construct-a-full-url
519519
const response = await fetch("/.proxy/api/token", {
520520
method: "POST",
521521
headers: {

docs/activities/development-guides/growth-and-referrals.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ async function handleReferral() {
100100

101101
## Creating and Managing Custom Incentivized Links
102102

103-
This guide covers creating a customizable [Incentivized Link](/docs/activities/development-guides#prompting-users-to-share-incentivized-links) through the dev portal, and then retrieving the link to be able to share it off-platform. Incentivized Links are used to customize how the embed appears to users.
103+
This guide covers creating a customizable [Incentivized Link](/docs/activities/development-guides/growth-and-referrals#prompting-users-to-share-incentivized-links) through the dev portal, and then retrieving the link to be able to share it off-platform. Incentivized Links are used to customize how the embed appears to users.
104104

105105
#### Creating a Link
106106

@@ -146,7 +146,7 @@ Users will see an embed with your information displayed. Clicking "Play" opens t
146146

147147
## Generating a Custom Link Within Your Activity
148148

149-
This guide covers creating a customizable [Incentivized Link](/docs/activities/development-guides#prompting-users-to-share-incentivized-links) within your activity, and using the `shareLink` API to share the link.
149+
This guide covers creating a customizable [Incentivized Link](/docs/activities/development-guides/growth-and-referrals#prompting-users-to-share-incentivized-links) within your activity, and using the `shareLink` API to share the link.
150150

151151
* Allows you to customize the way the link is presented to users via the embed
152152
* Can be generated on-demand within your activity

docs/activities/development-guides/local-development.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ sidebar_label: Local Development
66

77
## Run Your Application Locally
88

9-
It is possible to load your application via a localhost port or other unique URL. This URL must support an HTTPS connection to load on the web/desktop Discord app (HTTPS is not required for mobile). The downside to this flow is that your application's network traffic will not pass through Discord's proxy, which means any requests made by the application will need to use a full URL instead of a ["mapped"](/docs/activities/development-guides#url-mapping) URL.
9+
It is possible to load your application via a localhost port or other unique URL. This URL must support an HTTPS connection to load on the web/desktop Discord app (HTTPS is not required for mobile). The downside to this flow is that your application's network traffic will not pass through Discord's proxy, which means any requests made by the application will need to use a full URL instead of a ["mapped"](/docs/activities/development-guides/local-development#url-mapping) URL.
1010

11-
To run your locally hosted application, follow the instructions for [Launching your Application from the Discord Client](/docs/activities/development-guides#launch-your-application-from-the-discord-client) and set the Application URL Override to the address of your application's web server.
11+
To run your locally hosted application, follow the instructions for [Launching your Application from the Discord Client](/docs/activities/development-guides/local-development#launch-your-application-from-the-discord-client) and set the Application URL Override to the address of your application's web server.
1212

1313
### Running Your Application Through A Network Tunnel
1414

1515
Although it is possible to test your application locally, we recommend developing and testing against the Discord proxy. This is helpful to make sure all URLs behave as expected before your application runs in production. One technique to enable testing locally against the proxy is to use a network tunneling tool, such as [cloudflared](https://github.com/cloudflare/cloudflared#installing-cloudflared). A typical pattern is for each developer to have their own "development-only" application. To set up a local environment to run through Discord's proxy, you will need to do the following:
1616

1717
1. Create a new application in the Discord Developer portal.
1818
2. Enable Activities for your app.
19-
3. Set up the application's [URL mapping](/docs/activities/development-guides#url-mapping).
19+
3. Set up the application's [URL mapping](/docs/activities/development-guides/local-development#url-mapping).
2020
4. Locally, spin up your web server.
2121
5. Install and run a tunnel solution, such as [cloudflared](https://github.com/cloudflare/cloudflared#installing-cloudflared). You will point it to your local web server.
2222

@@ -45,16 +45,16 @@ In the Discord Developer Portal, update the Application URL mapping for `/` url
4545
If you do not own the URL that you are using to host the application (i.e. ngrok's free tier), someone else could claim that domain and host a malicious site in its place. Please be aware of these risks, and if you have to use a domain you do not own, be sure to reset your URL mapping when you are done using the tunnel.
4646
:::
4747

48-
Follow the instructions for [Launching your Application from the Discord Client](/docs/activities/development-guides#launch-your-application-from-the-discord-client). Application URL Override should not be enabled.
48+
Follow the instructions for [Launching your Application from the Discord Client](/docs/activities/development-guides/local-development#launch-your-application-from-the-discord-client). Application URL Override should not be enabled.
4949

5050
### Running Your Application In Production
5151

5252
The flow for setting up your production application is very similar:
5353

5454
1. If not made yet, create a new application.
5555
2. Enable Activities for your app.
56-
3. Set up the application's [URL Mapping](/docs/activities/development-guides#url-mapping). The URL for your application's html should be set to the `/` route.
57-
4. Follow the instructions for [Launching your Application from the Discord Client](/docs/activities/development-guides#launch-your-application-from-the-discord-client)). Application URL Override should not be enabled.
56+
3. Set up the application's [URL Mapping](/docs/activities/development-guides/local-development#url-mapping). The URL for your application's html should be set to the `/` route.
57+
4. Follow the instructions for [Launching your Application from the Discord Client](/docs/activities/development-guides/local-development#launch-your-application-from-the-discord-client)). Application URL Override should not be enabled.
5858

5959
This application now uses the same configuration it will use once it is fully published ✨.
6060
![application-test-mode-prod](images/activities/application-test-mode-prod.gif)

docs/activities/development-guides/networking.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ While we currently only support websockets, we're working with our upstream prov
1818

1919
WebRTC is not supported.
2020

21-
Other guides are available in this [Networking](/docs/activities/development-guides#networking) section for using external network resources and constructing a full url versus relative urls.
22-
2321
---
2422

2523
## Construct A Full URL
@@ -51,7 +49,7 @@ In other words, given an application client id of `12345678`
5149

5250
## Using External Resources
5351

54-
Activities in Discord are "sandboxed" via a Discord proxy. This is done to hide the users' IP addresses as well as block URLs from known malicious endpoints. To achieve this, the Discord Developer Portal has a section for [configuring URL Mappings](/docs/activities/development-guides#url-mapping) for your application.
52+
Activities in Discord are "sandboxed" via a Discord proxy. This is done to hide the users' IP addresses as well as block URLs from known malicious endpoints. To achieve this, the Discord Developer Portal has a section for [configuring URL Mappings](/docs/activities/development-guides/local-development#url-mapping) for your application.
5553

5654
One edge-case of URL mappings is that third-party NPM modules or other resources may reference external (non-sandboxed) urls.
5755

docs/activities/overview.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Activities are primarily opened when users invoke your app's [Entry Point comman
3838

3939
When you enable Activities for your app, a [default Entry Point command](/docs/interactions/application-commands#default-entry-point-command) called "Launch" is created for you. By default, Discord automatically handles opening your Activity when your Entry Point command is run by a user.
4040

41-
Read more about setting up Entry Point commands in the [development guide](/docs/activities/development-guides#setting-up-an-entry-point-command).
41+
Read more about setting up Entry Point commands in the [development guide](/docs/activities/development-guides/user-actions#setting-up-an-entry-point-command).
4242

4343
### Interaction Response
4444

@@ -54,7 +54,7 @@ The sections below provide an overview of the Embedded App SDK, but technical de
5454

5555
### Embedded App SDK
5656

57-
The [Embedded App SDK](/docs/developer-tools/embedded-app-sdk) handles all of the communication between Discord and your app, making it easier to do common tasks like managing connected users, supporting mobile clients, and debugging your Activity.
57+
The [Embedded App SDK](/docs/developer-tools/embedded-app-sdk) handles all of the communication between Discord and your app, making it easier to do common tasks like managing connected users, supporting mobile clients, and debugging your Activity.
5858

5959
The Embedded App SDK offers different events and commands to handle the communication between Discord and your Activity, which are covered more below.
6060

docs/change-log/2024-07-17-activities-proxy-csp-update.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ our CSP will be updated as follows:
1515
* Only allowed paths on `cdn.discordapp.com` and `media.discordapp.net` will be permitted such as `/attachments/`, `/icons/`, and `/avatars/`.
1616
* nested child iframes must also mount paths prepended by `/.proxy/`
1717

18-
As of [embedded-app-sdk v1.4.0](https://github.com/discord/embedded-app-sdk/releases/tag/v1.4.0) we have updated `patchUrlMappings` to automatically route requests through `/.proxy/`, so updating your SDK version calling `patchUrlMappings` is a good first step. If you are unfamiliar with `patchUrlMappings`, please consult the [documentation](/docs/activities/development-guides#using-external-resources).
18+
As of [embedded-app-sdk v1.4.0](https://github.com/discord/embedded-app-sdk/releases/tag/v1.4.0) we have updated `patchUrlMappings` to automatically route requests through `/.proxy/`, so updating your SDK version calling `patchUrlMappings` is a good first step. If you are unfamiliar with `patchUrlMappings`, please consult the [documentation](/docs/activities/development-guides/networking#using-external-resources).
1919

2020
All Application IDs created after `07/17/2024 12:00:00` UTC (applicationID greater than `1263102905548800000`) will also automatically have the new CSP applied. Testing your production code on a new application created after this date is a suggested way for developers to test compliance with this new CSP.

docs/change-log/2024-08-26-entry-point-commands.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ When creating or updating an Entry Point command, an [Entry Point handler](/docs
1212
- If the value is `DISCORD_LAUNCH_ACTIVITY` (`2`), Discord will automatically handle the interaction and send a follow-up message to the channel where the Entry Point command was invoked from.
1313
- If the value is `APP_HANDLER` (`1`), your app will receive an interaction token and will be responsible for responding to the interaction. In this case, you can launch your Activity using the `LAUNCH_ACTIVITY` (type `12`) [interaction callback](/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type).
1414

15-
More details about Entry Point commands can be found in the [Application Commands documentation](/docs/interactions/application-commands#entry-point-commands) and in the [Activity development guide](/docs/activities/development-guides#setting-up-an-entry-point-command).
15+
More details about Entry Point commands can be found in the [Application Commands documentation](/docs/interactions/application-commands#entry-point-commands) and in the [Activity development guide](/docs/activities/development-guides/user-actions#setting-up-an-entry-point-command).
1616

1717
### Default Entry Point Commands
1818

19-
Starting today, when you enable Activities in your [app's settings](http://discord.com/developers/applications), a [default Entry Point command](/docs/interactions/application-commands#default-entry-point-command) called "Launch" will automatically be created for your app. This can be customized or deleted like other commands if you want to update the name or handler type.
19+
Starting today, when you enable Activities in your [app's settings](http://discord.com/developers/applications), a [default Entry Point command](/docs/interactions/application-commands#default-entry-point-command) called "Launch" will automatically be created for your app. This can be customized or deleted like other commands if you want to update the name or handler type.

0 commit comments

Comments
 (0)