File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
docs/activities/development-guides Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -166,9 +166,10 @@ const linkIdResponse = await fetch(`${env.discordAPI}/applications/${env.applica
166
166
method: ' POST' ,
167
167
headers: {
168
168
Authorization: ` Bearer ${ accessToken} ` ,
169
+ ' Content-Type' : ' application/json' ,
169
170
},
170
171
body: {
171
- custom_id: ' user_123/game_456'
172
+ custom_id: ' user_123/game_456' ,
172
173
description: ' I just beat level 10 with a perfect score' ,
173
174
title: ' Check out my high score!' ,
174
175
image,
@@ -178,7 +179,8 @@ const {link_id} = await linkIdResponse.json();
178
179
179
180
// Open the Share modal with the generated link
180
181
const {success } = await discordSdk .commands .shareLink ({
181
- linkId: link_id
182
+ message: ' Check out my high score!' ,
183
+ link_id,
182
184
});
183
185
success ? console .log (' User shared link!' ) : console .log (' User did not share link!' );
184
186
```
You can’t perform that action at this time.
0 commit comments