Asks for input now!

This commit is contained in:
Bingus_Violet 2023-12-03 22:15:48 -06:00
parent 108afd8ffd
commit 605d0a2e5f
4 changed files with 38 additions and 5 deletions

View file

@ -41,12 +41,15 @@ Although this isn't nessacarily the most sophisticated method for getting your s
### Running it ### Running it
Lastly, all you need to do, is open a terminal and run Lastly, all you need to do, is open a terminal and run
``` ```
STEAM_ID=[your steam id] node index.js node index.js
``` ```
There are also option environment variables: There are also option environment variables:
- `UPDATE_TIME=[number of seconds to update]` - `UPDATE_TIME=[number of seconds to update]`
- **this HAS TO BE over 30 seconds** - **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!:<br> If everything is setup properly, it should look something like this!:<br>
![Alt text](docs/examples/image.png)<br> ![Alt text](docs/examples/image.png)<br>

View file

@ -1,10 +1,11 @@
const fs = require('fs') const fs = require('fs'),
prompt = require("prompt-sync")()
var updateTime = (process.env.UPDATE_TIME || 45) var updateTime = (process.env.UPDATE_TIME || 45)
var clientId = "1176317740512985119" var clientId = "1176317740512985119"
const steamID = process.env.STEAM_ID 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)/" const thumborURL = "https://thumbor-production-0e82.up.railway.app/unsafe/fit-in/512x512/filters:fill(transparent)/"

30
package-lock.json generated
View file

@ -9,7 +9,16 @@
"version": "1.0.0", "version": "1.0.0",
"license": "GPL-3.0-or-later", "license": "GPL-3.0-or-later",
"dependencies": { "dependencies": {
"discord-rpc": "^4.0.1" "discord-rpc": "^4.0.1",
"prompt-sync": "^4.2.0"
}
},
"node_modules/ansi-regex": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz",
"integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==",
"engines": {
"node": ">=6"
} }
}, },
"node_modules/bindings": { "node_modules/bindings": {
@ -64,6 +73,14 @@
} }
} }
}, },
"node_modules/prompt-sync": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/prompt-sync/-/prompt-sync-4.2.0.tgz",
"integrity": "sha512-BuEzzc5zptP5LsgV5MZETjDaKSWfchl5U9Luiu8SKp7iZWD5tZalOxvNcZRwv+d2phNFr8xlbxmFNcRKfJOzJw==",
"dependencies": {
"strip-ansi": "^5.0.0"
}
},
"node_modules/register-scheme": { "node_modules/register-scheme": {
"version": "0.0.2", "version": "0.0.2",
"resolved": "git+ssh://git@github.com/devsnek/node-register-scheme.git#e7cc9a63a1f512565da44cb57316d9fb10750e17", "resolved": "git+ssh://git@github.com/devsnek/node-register-scheme.git#e7cc9a63a1f512565da44cb57316d9fb10750e17",
@ -75,6 +92,17 @@
"node-addon-api": "^1.3.0" "node-addon-api": "^1.3.0"
} }
}, },
"node_modules/strip-ansi": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"dependencies": {
"ansi-regex": "^4.1.0"
},
"engines": {
"node": ">=6"
}
},
"node_modules/tr46": { "node_modules/tr46": {
"version": "0.0.3", "version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",

View file

@ -1,6 +1,7 @@
{ {
"dependencies": { "dependencies": {
"discord-rpc": "^4.0.1" "discord-rpc": "^4.0.1",
"prompt-sync": "^4.2.0"
}, },
"name": "steamrpc", "name": "steamrpc",
"description": "SteamRPC pulls your game and presence from Steam and puts it onto discord.", "description": "SteamRPC pulls your game and presence from Steam and puts it onto discord.",