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 7 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

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