Launching on Discord Activities
This article explains the requirements and process for Pley games to launch on Discord as an activity.
Be on Pley; be on everywhere.
When your game runs on Pley, you only have to maintain one version of your game to run on multiple places.
When you make game updates, it automatically goes live on any site or app which runs your web game, including Discord. This means that once your game is launched on Discord, no additional upkeep is needed.Estimated time to launch on Discord: 0-2 Days + QA testing.
- Set up Discord Activity
- Enable Server Communication
- Enable in-game purchases (Products/SKUs)
Set Up A Discord Activity on Pley
- Reach out to the Pley team so your Pley game can be Discord enabled (24-48 hours).
- Have a Discord organization through the Discord Developer Portal.
- Set up a Discord activity, add payout information, and everything Discord requires to launch an activity.
- In Pley Game Manager (manage.pley.com):
- "Project" → “Project Settings” → “Discord”
- Add
Client ID
(sometimes called Application ID), found under "General Information" and/or "OAuth2" in Discord. - Add
Client Secret
, found under OAuth2 in Discord. - Add
Bot Token
, found under “Bot” in Discord. Refresh the token in Discord and add it to the Game Manager. - These 3 values must be set simultaneously and will only be set once, by someone with admin access in the Discord organization.
- Get the
release track ID
from Pley Game Manager under “Release Tracks” → “Production” → “Integration” → “Release Track ID”.
- In the Discord Developer Portal:
- Under "URL Mapping", set the root mapping to “/” and set the target to
[releaseTrackID].discord.pley.com/v1
- Under "OAuth2", add a Redirect URI. To enable authentication with Pley, set it to
https://[releaseTrackID].discord.pley.com/v1/discord/oauth2
. - Under "Settings", check "Enable Activities" to make your game visible in Discord, enabling testing.
- Under "URL Mapping", set the root mapping to “/” and set the target to
- Discord configuration:
- Add a name, icon, and description for your Discord activity game under “General”.
- Add a name, icon, and banner image for your Discord activity bot under “Bot”.
- Do any other configurations you need in the Discord Developer Portal for the activity.
- Now the game client can be run from within Discord!
- Publish the game:
- Under “App Verification”, fulfill the discord requirements to publish the game.
- Publish the activity on Discord via the App Verification page. If it’s not visible, it has already been published. Published games can be started, but they are not yet discoverable.
Enable Server Calls on Discord
Now calls to services (such as Firebase) and the game server itself are not allowed. We need to allow the Discord activity to communicate with servers by adding all origins to both Discord and the Pley Game Manager.
- Go to Discord under “URL Mappings”.
- Add prefix (any unique string)
- Add the origin to “Target”.
- Go the the Pley Game Manager → "Project Settings" → "Discord" → "URL Mappings" and copy the exact setup (prefix/target) in Discord.
- Make sure that all prefixes are unique, and that the URL Mappings for Discord + Pley Game Manager are identical.
Enable In-game Purchases in Discord
The final step is adding products. To do that, we need to create all products manually in Discord as there is no API for SKU creation. The Pley Game Manager has automated the rest.
- Create all purchaseable products in Discord with identical names to the products on Pley (Discord SKU Documentation ).
- Once each product exists, go to the Pley Game Manager → “In-game products”.
- We must now link the Pley products with the Discord products for purchases to work. It can be done in two ways:
- Use the “Autolink SKUs” button to find and link products based on their name.
- Edit each product and use the dropdown to link it to a Discord SKU.
- Finally, make sure that all products on Pley have a linked Discord SKU with an identical name, and that the SKUs in Discord are published.
Done!
Your game is ready to be shared and made discoverable. Any feature which works on Pley will function on Discord, and any new updates released on Production will be automatically published on Discord.
If changes to pricing or products are made, the same change will have to be made in the Discord activity dashboard (as Discord currently does not provide an API for managing SKUs).
Limitations of Discord
Launching a Pley game on Discord takes nearly no time, and has no maintenance; if it runs on Pley it runs on Discord. Unfortunately, Discord does come with some limitations. For reference, here are them:
- Discord does not support ads. On Discord, all rewarded ads will instantly be granted to the Player.
- Any updates, removals, and additions to products must be manually matched in Discord activity SKUs.
- Discord communication must go through a proxy system. This obscures some player analytics, such as their country.
Updated 6 days ago