Discord Developer Platform

website·Indexed 32 days ago

https://docs.discord.food/

Documentation for the Discord Developer Platform, including the Discord Social SDK, slash command improvements, Invite Target User endpoints, and the developer change log.

Tokens
32.6K
Snippets
101
Records
312
Agent score
65%

What's inside Discord

  1. Overview of Sign in with Apple REST API

    The Sign in with Apple REST API is a web service used to communicate between your app servers and Apple’s authentication servers. Its primary purpose is to generate and validate identity tokens to verify a user's identity.

    Depending on the platform, different tools should be used:

    • Web apps or non-Apple platforms (e.g., Android): Use Sign in with Apple JS.
    • Native Apple platforms (iOS, macOS, tvOS, watchOS): Use the AuthenticationServices framework.
    • Server-to-server communication: Use the Sign in with Apple REST API.
  2. Overview of Stripe Setup Intents

    A SetupIntent is used to guide the process of setting up and saving a customer's payment credentials for future payments without immediately collecting a payment. This ensures that payment methods are optimized for future use (e.g., handling Strong Customer Authentication in specific regions) and reduces friction for off-session payments. If a SetupIntent is associated with a Customer, the resulting payment method is automatically attached to that Customer upon success. It is recommended to use SetupIntents or the setup_future_usage parameter on PaymentIntents rather than manually saving payment methods to avoid saving invalid or unoptimized credentials.
  3. Understand the .riv binary file format

    The .riv file is a binary runtime format exported from the Rive Editor. It contains a representation of Artboards, Shapes, Animations, and State Machines. It is designed for fast load times and small file sizes. The format uses little-endian byte order.
  4. Use custom_id for shareLink parameters

    The shareLink API now uses custom_id to attach custom parameters to links shared about a game. The referrer_id field has been removed and will silently fail if passed; all referral logic should be migrated to custom_id.
  5. Implement Rich Presence for game integration

    Rich Presence allows developers to integrate game data into Discord profiles. Key capabilities include showing detailed information about a user's current game, allowing users to post invitations to join a party or spectate a game in chat, and displaying 'Spectate' and 'Ask to Join' buttons on profiles.
  6. Use Discord Docs with AI and MCP tools

    The Discord Developer Documentation now supports AI development tools and Model Context Protocol (MCP). Developers can access the documentation via:

    • Copy-as-Markdown functionality
    • An llms.txt file
    • An MCP server located at https://docs.discord.com/mcp
  7. Understand the impact of Age Assurance on Discord Apps

    Age assurance is rolling out globally. While existing apps, bots, and SDK integrations continue to function, developers may observe the following runtime behaviors:

    • Bots & Apps: Custom statuses from user presence may be limited by Private Profile settings.
    • Activities: Users may be required to confirm their age group for age-restricted Activities.
    • Commerce: Parent-set spending limits may block certain purchases.
    • Social SDK: Direct Messages (DMs) may be filtered into Message Requests more frequently.
  8. Retrieve team information for applications

    The 'Get Current Application Information' endpoint returns a team object if the application belongs to a team. This includes detailed information about the team and team member objects.
  9. Choose a Discord development path

    Depending on your goals, the Discord Developer Platform offers three primary integration paths:

    • Bots & Apps: Build automated applications, slash commands, and integrations that operate within Discord servers.
    • Activities: Create multiplayer games and social experiences that launch directly inside the Discord client.
    • Social Layer for Games: Integrate rich presence, voice chat, and other social features into an external game across various platforms.
  10. Handle GitHub webhook delivery headers

    GitHub sends several HTTP headers with every webhook POST request. These headers provide metadata about the event, the resource that triggered it, and security signatures for payload validation.
    X-GitHub-Hook-ID: Unique identifier of the webhook
    X-GitHub-Event: Name of the event that triggered the delivery
    X-GitHub-Delivery: Globally unique identifier (GUID) for the event
    X-Hub-Signature: HMAC hex digest (SHA-1) of the body (sent if secret is configured)
    X-Hub-Signature-256: HMAC hex digest (SHA-256) of the body (sent if secret is configured; recommended over X-Hub-Signature)
    User-Agent: Always prefixed with "GitHub-Hookshot/"
    X-GitHub-Hook-Installation-Target-Type: Type of resource where the webhook was created
    X-GitHub-Hook-Installation-Target-ID: Unique identifier of the resource where the webhook was created
  11. Identify common GitHub webhook payload parameters

    Most GitHub webhook events include a set of standard parameters in their JSON payload. These provide context about the action, the actor, and the affected resources.
    {
      "action": "string", // Required
      "repository": "object", // Required: The repository where the event occurred
      "sender": "object", // Required: The GitHub user who triggered the event
      "organization": "object", // Present if configured for an org or event occurs in an org-owned repo
      "installation": "object", // Present if the event is sent to a GitHub App
      "enterprise": "object" // Present if configured on an enterprise account or org within an enterprise
    }
  12. Integrate social features with the Discord Social SDK

    The Discord Social SDK allows developers to integrate social features into games for all players, regardless of whether they have a Discord account. Key features include Account Linking, Provisional Accounts, Rich Presence, and Deeplink Game Invites. Cross-platform messaging (Linked Channels) and Voice Chat are available via closed beta.