Skip to content

Fix syntax errors in code example for Generating a Link in Growth and Referrals #7530

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/activities/development-guides/growth-and-referrals.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,10 @@ const linkIdResponse = await fetch(`${env.discordAPI}/applications/${env.applica
method: 'POST',
headers: {
Authorization: `Bearer ${accessToken}`,
'Content-Type': 'application/json',
},
body: {
custom_id: 'user_123/game_456'
custom_id: 'user_123/game_456',
description: 'I just beat level 10 with a perfect score',
title: 'Check out my high score!',
image,
Expand All @@ -178,7 +179,8 @@ const {link_id} = await linkIdResponse.json();

// Open the Share modal with the generated link
const {success} = await discordSdk.commands.shareLink({
linkId: link_id
message: 'Check out my high score!',
link_id,
});
success ? console.log('User shared link!') : console.log('User did not share link!');
```