Discord Activities
Integrate your Rivet game with Discord Activities.
Set up Discord SDK
Set up the Discord SDK (docs):
JavaScript
Update lobbies code
Update your Rivet matchmaking code to include tags:
JavaScript
Set up route mapping
After following the activity tutorial, access the URL mapping for your Discord app and configure it like so:
Prefix | Target |
---|---|
/gstatic | fonts.gstatic.com/ |
/ws | lobby.rivet.run/ |
/api | api.rivet.gg/ |
/ | asteroids-xxx.rivet.game/ |
Note
The URL used for the "Root Mapping" will be printed in the console when you deploy to Rivet via rivet deploy
.
Run activity
Run activity (read docs here)
Example repo
A fully integrated example can be found here. (This is using a slightly dated API, but is lagely identical.)