Closed AndyShade closed 6 years ago
No, this is not possible, and really isn't worth it to implement. Just setup two different instances (two different folders) with two different gettoken.json
could possibly allow --token to have multiple tokens but it's still kind of pointless, i will see what i can do in a bit
but you can also just start two command prompts with --token <file>
as well
Well, I replaced const gettoken = JSON.parse(fs.readFileSync(token_file, "utf8"));
with const gettoken = JSON.parse(args[0]);
and made a batch file with the following commands:
start node headless "{\"webapi_host\":\"https:\/\/community.steam-api.com\/\",\"webapi_host_secure\":\"https:\/\/community.steam-api.com\/\",\"token\":\"XXT0k3nXX\",\"steamid\":\"01234567890123456\",\"persona_name\":\"bot1\",\"success\":1}" start node headless "{\"webapi_host\":\"https:\/\/community.steam-api.com\/\",\"webapi_host_secure\":\"https:\/\/community.steam-api.com\/\",\"token\":\"XXT0k3nXX\",\"steamid\":\"78901234567890123\",\"persona_name\":\"bot2\",\"success\":1}"
...
Please note, if you have a space in your bot's persona name, you should put the gettoken string in quotes, also, don't forget to escape any other quotes
Edit: Also comment out else throw new Error(
invalid command line argument ${arg});
why would you comment out that error?
Since your if statement filters arguments, it won't do anything with the invalid ones. If that error is not commented out, the script will simply stop after launch with my argument
configure gettoken.json, gettoken1.json or `{"webapi_host":"https:\/\/community.steam-api.com\/","webapi_host_secure":"https:\/\/community.steam-api.com\/","token":"not real","steamid":"0","persona_name":"Meepen","success":1}
{"webapi_host":"https:\/\/community.steam-api.com\/","webapi_host_secure":"https:\/\/community.steam-api.com\/","token":"not real","steamid":"0","persona_name":Beepen","success":1} `