SteamRPC pulls your game and presence from Steam and puts it onto discord.
Find a file
2023-12-15 19:07:32 +00:00
docs more docs 2023-11-22 12:23:34 -06:00
.gitignore Automatic Images! 2023-11-30 00:37:20 -06:00
index.js Add warning 2023-12-15 19:07:32 +00:00
LICENSE Initial commit 2023-11-22 17:34:40 +00:00
package-lock.json Asks for input now! 2023-12-03 22:15:48 -06:00
package.json Asks for input now! 2023-12-03 22:15:48 -06:00
README.md More notes! 2023-12-15 17:21:54 +00:00

SteamRPC

SteamRPC pulls your game and presence from Steam and puts it onto discord.

Table of Contents

Setup

Downloading the repository

Simply run:

git clone https://codeberg.org/Bingus_Violet/SteamRPC
cd SteamRPC

In order for SteamRPC to run, you need to provide it with a Steam ID. There are 2 ways to do this, the first is through environment variables.
Example:

STEAM_ID=12345678 node index.js

Alternatively, running SteamRPC without providing an ID through an environment variable will make it prompt you for one.

Below you can find documentation for how to get your Steam ID.

Steam Setup

Getting your Steam ID is a much simpler process.

  1. Navigate to Steam and login if you haven't already (You can do this both in the app or on the web)
  2. Hover on your username at the top and go to "friends"
  3. Navigate to the "Add a friend page" on the left
  4. Copy your friend code

Now replace the STEAM_ID environment variable with the SteamID you just got.

Although this isn't nessacarily the most sophisticated method for getting your steam ID, its the one I find the easiest.

Running it

Lastly, all you need to do, is open a terminal and run

node index.js

Here is a concise list of all environment variables:

  • UPDATE_TIME=[number of seconds to update]
    • this HAS TO BE over 30 seconds
  • STEAM_ID=[your_steam_id]
    • Prevents the program from prompting you for your steam ID

If everything is setup properly, it should look something like this!:
Alt text Alt text Alt text Alt text

Notes

This project was never meant to be public, but I decided there was no reason not to. Please do report any problems you encounter, and if there are any issues with the documentation, please let me know!

If an image is wider than 1:1, then discord automatically "zooms in" on the image. Sadly, the only high quality image for the game we can get from Steam is very wide, specifically its the title icon. To fix this, all images are funneled through "thumbor" Currently I am using a self hosted instance of Thumbor for this, which automatically changes the image size so it fits in Discord. The link to the Thumbor instance can be found here: https://thumbor-production-0e82.up.railway.app/ For getting the right image size, we use this url configuration: https://thumbor-production-0e82.up.railway.app/unsafe/fit-in/512x512/filters:fill(transparent)/[Link to the image]

To-Do

  • Pull images from steam directly
  • Show profile picture and username as small Image
  • Hide when not playing a game
  • Allow Steam Icon Overrides
  • Add blacklist for certain games that have their own RPC
  • Add config