THE NEX on Discord
Play THE NEX as a Discord Activity, right in your voice channel. Everyone in the call drops into the same hub, and they're your squad for the Raid Gate.
Join the NEX DiscordHow to play it in Discord
- Join a voice channel on a server where THE NEX is added.
- Press the rocket (Activities) button and pick THE NEX.
- Sign in with Discord. If you already have a NEX runner, link it once with your runner name and password; your loot and levels come along. New here? Start a runner with your Discord name.
- Everyone who launches THE NEX in the same call lands in the same private hub. Open the Raid Gate and bring them along.
It works on desktop and on the Discord mobile app. Your runner is the same one you play on thenex.world.
Setup notes (NEX Level Labs team)
What has to happen in the Discord Developer Portal and Vercel before the Activity works. The game code is already live.
- Create the app. discord.com/developers/applications → New Application → "THE NEX". Add the icon (
icon-512.png) and description. - OAuth2. Copy the Client ID and reset/copy the Client Secret. Add the redirect
https://127.0.0.1(Discord requires one; Activities don't use it). - Vercel env vars (Production):
DISCORD_CLIENT_IDandDISCORD_CLIENT_SECRET, then redeploy. Without them the Activity says it isn't set up and plays as a guest. - Activities → URL Mappings, exactly:
Prefix Target For /www.thenex.worldthe game and its API /jsdelivrcdn.jsdelivr.netthree.js, PeerJS, GLITCH models and metadata /peerjs0.peerjs.comthe multiplayer matchmaking broker (WebSocket) - Activities → Settings: enable Activities; supported platforms Web, Android and iOS; orientation lock landscape on mobile.
- Installation: allow Guild Install. Until Discord verifies the app, only App Testers (App Testers page) and members of servers you own can launch it, with Developer Mode on (User Settings → Advanced).
- Test: join a voice channel → rocket button → THE NEX. A second account in the call should appear in your hub within a few seconds.
- Going public: apply for app verification and Activity discovery in the portal once it plays well.
How it works
- Sign-in: the Activity asks Discord for an
identifycode;/api/accountswaps it for a token with the client secret and signs you in as the runner linked to that Discord user (columnplayers.discord_id). Unlinked users link an existing runner with its password, or create one (no password; Discord is the way in). - Session: Discord runs the game in a third-party iframe, so the session token also travels as an
x-nex-sessionheader. - Squad: the hub room is derived from the Activity instance, so only the people in that call share it; the Raid Gate offers them as your squad.
- Not checked yet inside Discord itself (needs the app set up): whether Discord's CSP allows the page's inline scripts, and peer-to-peer WebRTC between players there. If either fails, the console in Discord's DevTools (Ctrl+Shift+I with Developer Mode) will say so.