Skip to content
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

[guides] add Prompting Users to Share Incentivized Links Guide #7342

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

afgiel
Copy link
Contributor

@afgiel afgiel commented Jan 13, 2025

No description provided.

@afgiel afgiel requested a review from a team as a code owner January 13, 2025 20:59
@afgiel afgiel requested review from shaydewael and removed request for a team January 13, 2025 20:59
@afgiel afgiel requested a review from colinloretz January 14, 2025 20:31
const customId = await createPromotionalCustomId();

try {
const { success } = await DiscordRPC.commands.shareLink({

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this shareLink method display a modal for picking share destinations?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Comment on lines +916 to +918
if (success) {
// Track successful share for analytics/limiting
await trackSuccessfulShare(customId);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a user clicks a "copy link" button in the modal but then closes it without doing on-platform sharing, what is the value of success?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

success will be true upon copy


When implementing sharing, you'll need to:
1. Generate a unique ID for tracking the promotion
2. Call the `shareLink` command
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linking to the reference will help answer questions like @brad-discord asked below. We can also mention explicitly in the copy. "share the link via a modal".

Suggested change
2. Call the `shareLink` command
2. Call the [`shareLink`](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/sharelink) command

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we're going to be doing a refresh of these guides and design patterns and will be more heavily linking to the reference

- Track and validate referrals to prevent abuse
- Handle edge cases like expired promotions gracefully
- Consider implementing cool-down periods between shares

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
---

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants