Skip to content

Commit 223a160

Browse files
afgielcolinloretz
andauthored
add simple embedded app sdk shareLink docs (#7339)
* add simple embedded app sdk shareLink docs * npm run fix:tables * Update docs/developer_tools/Embedded_App_SDK.mdx Co-authored-by: Colin Loretz <[email protected]> * Update docs/developer_tools/Embedded_App_SDK.mdx Co-authored-by: Colin Loretz <[email protected]> * Update docs/developer_tools/Embedded_App_SDK.mdx Co-authored-by: Colin Loretz <[email protected]> --------- Co-authored-by: Colin Loretz <[email protected]>
1 parent 4000472 commit 223a160

File tree

1 file changed

+49
-1
lines changed

1 file changed

+49
-1
lines changed

docs/developer_tools/Embedded_App_SDK.mdx

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ Developers can use these commands to interact with the Discord client. The follo
175175
| [setActivity](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/setactivity) | Modifies how your activity's rich presence is displayed in the Discord client |
176176
| [setConfig](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/setconfig) | Set whether or not the PIP (picture-in-picture) is interactive |
177177
| [setOrientationLockState](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/setorientationlockstate) | Set options for orientation and picture-in-picture (PIP) modes |
178+
| [shareLink](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/sharelink) | Presents a modal for the user to share a link to your activity with custom query params |
178179
| [startPurchase](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/startpurchase) | Launches the purchase flow for a specific SKU, per the sku_id |
179180
| [userSettingsGetLocale](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/usersettingsgetlocale) | Returns the current user's locale |
180181

@@ -691,6 +692,39 @@ await discordSdk.commands.setOrientationLockState({
691692

692693
---
693694

695+
696+
### shareLink()
697+
698+
Presents the user with a modal to share a link
699+
700+
#### Supported Platforms
701+
| Web | iOS | Android |
702+
|-----|-----|---------|
703+
|| ⛔️ | ⛔️ |
704+
705+
#### Required Scopes
706+
707+
No scopes required
708+
709+
#### Signature
710+
711+
<Monospace>
712+
shareLink(args: [ShareLinkRequest](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/sharelinkrequest)): Promise\<[ShareLinkResponse](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/sharelinkresponse)\>\<void\>
713+
</Monospace>
714+
715+
#### Usage
716+
717+
```js
718+
const { success } = await discordSdk.commands.shareLink({
719+
message: 'This message is shared alongside the link!',
720+
referrer_id: 'some_referrer_id',
721+
custom_id: 'some_custom_id',
722+
});
723+
success ? console.log('User shared link!') : console.log('User did not share link!');
724+
```
725+
726+
---
727+
694728
### startPurchase()
695729

696730
Launches the purchase flow for a specific SKU ID.
@@ -1398,6 +1432,20 @@ No scopes required
13981432
| picture_in_picture_lock_state | [OrientationLockState](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/orientationlockstatetypeobject) |
13991433
| grid_lock_state | [OrientationLockState](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/orientationlockstatetypeobject) |
14001434

1435+
#### ShareLinkRequest
1436+
1437+
| Property | Type |
1438+
|-------------|----------------|
1439+
| message | string \| null |
1440+
| referrer_id | string \| null |
1441+
| custom_id | string \| null |
1442+
1443+
#### ShareLinkResponse
1444+
1445+
| Property | Type |
1446+
|----------|---------|
1447+
| success | boolean |
1448+
14011449
#### Sku
14021450

14031451
| Property | Type |
@@ -1604,4 +1652,4 @@ No scopes required
16041652
| DLC | 2 |
16051653
| CONSUMABLE | 3 |
16061654
| BUNDLE | 4 |
1607-
| SUBSCRIPTION | 5 |
1655+
| SUBSCRIPTION | 5 |

0 commit comments

Comments
 (0)