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
166166 method: ' POST' ,
167167 headers: {
168168 Authorization: ` Bearer ${ accessToken} ` ,
169+ ' Content-Type' : ' application/json' ,
169170 },
170171 body: {
171- custom_id: ' user_123/game_456'
172+ custom_id: ' user_123/game_456' ,
172173 description: ' I just beat level 10 with a perfect score' ,
173174 title: ' Check out my high score!' ,
174175 image,
@@ -178,7 +179,8 @@ const {link_id} = await linkIdResponse.json();
178179
179180// Open the Share modal with the generated link
180181const {success } = await discordSdk .commands .shareLink ({
181- linkId: link_id
182+ message: ' Check out my high score!' ,
183+ link_id,
182184});
183185success ? console .log (' User shared link!' ) : console .log (' User did not share link!' );
184186```
You can’t perform that action at this time.
0 commit comments