From fd44ee249bad9803687a66981321fc8c2bcd0686 Mon Sep 17 00:00:00 2001 From: Bingus_Violet Date: Fri, 15 Dec 2023 17:16:24 +0000 Subject: [PATCH 1/3] Update README.md --- README.md | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 62ddb86..3fdd427 100644 --- a/README.md +++ b/README.md @@ -19,10 +19,12 @@ git clone https://codeberg.org/Bingus_Violet/SteamRPC cd SteamRPC ``` -In order for SteamRPC to run, you need to give it 2 environment variables.
Example: +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: ```bash 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. @@ -45,17 +47,17 @@ node index.js ``` -There are also option environment variables: +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](docs/examples/image.png)
-![Alt text](docs/examples/image-1.png)
-![Alt text](docs/examples/image-2.png)
-![Alt text](docs/examples/image-3.png)
+![Alt text](docs/examples/image.png) +![Alt text](docs/examples/image-1.png) +![Alt text](docs/examples/image-2.png) +![Alt text](docs/examples/image-3.png) ## Notes @@ -65,6 +67,7 @@ This project was never meant to be public, but I decided there was no reason not - [x] Pull images from steam directly - [x] Show profile picture and username as small Image +- [x] Hide when not playing a game - [ ] Allow Steam Icon Overrides -- [ ] Add config -- [ ] Allow more configurable options \ No newline at end of file +- [ ] Add blacklist for certain games that have their own RPC +- [ ] Add config \ No newline at end of file From 79ce06543ffcc48566fed9a7fdb435dfa73c84a6 Mon Sep 17 00:00:00 2001 From: Bingus_Violet Date: Fri, 15 Dec 2023 17:21:54 +0000 Subject: [PATCH 2/3] More notes! --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 3fdd427..205128e 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,13 @@ If everything is setup properly, it should look something like this!:
## 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 - [x] Pull images from steam directly From af8cba1afb8919c9a47f22e311c77f97eca562b5 Mon Sep 17 00:00:00 2001 From: Bingus_Violet Date: Fri, 15 Dec 2023 19:07:32 +0000 Subject: [PATCH 3/3] Add warning --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index fde2f73..eedd749 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,7 @@ const fs = require('fs'), prompt = require("prompt-sync")() -var updateTime = (process.env.UPDATE_TIME || 45) +var updateTime = 45 var clientId = "1176317740512985119" @@ -9,7 +9,7 @@ const steamID = process.env.STEAM_ID || prompt("What is your Steam ID?: ") const thumborURL = "https://thumbor-production-0e82.up.railway.app/unsafe/fit-in/512x512/filters:fill(transparent)/" -if (updateTime < 30) { +if (updateTime < 30) { // Please, refrain from changing this! This program is already effectively DDoSing valve servers, I dont want it to go any further! console.error("Update time must be above 30! Please change your settings!") return }