This project is a Discord Rich Presence client for Xbox. It uses the xbdm.js library to connect to an Xbox console and update the user's Discord presence based on the current game being played.
- Node.js
- An Xbox console with debugging enabled
- A Discord application for the Rich Presence feature
-
Clone this repository:
git clone https://github.com/yourusername/xbox-discord-presence.git cd xbox-discord-presence -
Run
npm installto install the required dependencies:npm install
-
Create a Discord Application:
- Go to the Discord Developer Portal.
- Log in with your Discord account if you aren’t already.
- Click on the “New Application” button.
- Enter a name for your application and click “Create” to create the application.
-
Get the Client ID:
- On the application’s settings page, locate the “General Information” section.
- Find the “Client ID” and click the “Copy” button to copy it to your clipboard.
-
Edit the
.env:clientId=YOUR_DISCORD_CLIENT_ID IP=YOUR_XBOX_IP_ADDRESS showGamertag=true
- Replace
YOUR_DISCORD_CLIENT_IDwith the Client ID you obtained from the Discord Developer Portal. - Replace
YOUR_XBOX_IP_ADDRESSwith your Xbox's IP address. - Set
showGamertagtotrueif you want to display your gamertag in the Discord presence.
- Replace
-
Run the application:
npm install node index.js
-
The script will connect to your Xbox and Discord client, then continuously check for changes in your current game. It will update your Discord presence with the game's name and optionally display your gamertag.
startRPC(): Connects to the Discord client and logs in with the provided client ID.getTitleId(): Retrieves the current Title ID from Xbox memory.getProfileId(): Retrieves the current Profile ID from Xbox memory.getGamertag(): Retrieves the current gamertag from Xbox memory.updateGamePresence(titleId): Updates the Discord presence based on the current game title.checkActivity(): Periodically checks for changes in the Title ID and updates the Discord presence if necessary.main(): Connects to Xbox and Discord, then starts checking activity.
- Ensure that your Xbox is connected and accessible.
- Verify that the
.envfile is correctly configured. - Check the console for error messages if the application fails to run.
- Professional C# Tool.
- Original Code: Xbox360DiscordRichPresence