-
Posts
3628 -
Joined
-
Last visited
Everything posted by Dr. McKay
-
Advice for concurrency and logging in with multiple trade bots
Dr. McKay replied to jermz's topic in node-steam-user
You would most likely run into rate limiting if you tried to run 20 bots from the same IP address. You will probably need at least two IPs. Running 10 bots per IP isn't unheard of, depending on how many HTTP requests you make from each bot. You don't necessarily need proxies if you can have multiple IPs on whatever server you're running on. In this case, you'd want to use localAddress to pick which IP each bot uses. I don't personally use loginKeys. The biggest benefit to using them is that you don't need to have your bot's password and two-factor secret in config files on your server. Problem is, using a loginKey doesn't actually always work (thanks Valve!) so you'll need to enter passwords and 2FA codes at some point anyway. Personally, I prefer to just put the password and 2FA secret in a config file and use those. You really shouldn't run the same bot in two different processes. You'll probably run into issues doing so. You're better off just running one process for each bot and building in some way to communicate with those processes if you need to control the bot externally. I tend to prefer to start up an HTTP server using the built-in http module and just make POST requests to control the bot. -
Try adding client.on('debug', console.log) and see if there's anything useful in that output.
-
I don't currently have plans to add it.
- 3 replies
-
- node.js
- node-steamcommunity
-
(and 1 more)
Tagged with:
-
I'm not sure you can do that with steamcommunity right now.
- 3 replies
-
- node.js
- node-steamcommunity
-
(and 1 more)
Tagged with:
-
Using setInterval will make it automatically call webLogOn every 30 minutes (with your configuration). If you call setInterval more than once, it will call webLogOn more than once every 30 minutes.
-
I don't know exactly what limitations are placed on loginKeys, sorry. I've never really looked into it. loginKeys are what the Steam client uses when you check the "remember my password" box to automatically log you back in every time you restart Steam. Web logon tokens aren't useful for this purpose since they are only good for a few minutes.
-
Yes, you should put that outside of any callback. It should only ever be called once. Also, there's no use in nesting it inside a setTimeout.
-
Every time you get a new web session, you're starting a new interval to call client.webLogOn(). So after a half hour, your web logon rate has elapsed 6 times and now you're calling client.webLogOn() 6 times every 30 minutes.
-
Check out rememberPassword and loginKey.
-
You should probably attach a callback so you can see if there was an error.
-
What is there to fix? If you're trade banned you aren't necessarily community banned.
-
https://github.com/DoctorMcKay/node-steamcommunity/releases/tag/v3.41.1
-
Either your clock is wrong or your secret is wrong.
-
It cannot be added to steam-user. Sorry. You don't need to call getSteamUser to use this method. Just call community.sendImageToUser(steamID, imageBuffer, options, callback).
-
Your shared_secret is retrieved from enabling mobile two factor using steamcommunity. If you don't have a mobile authenticator enabled on your account, then you can't use generateAuthCode and you need to get a code from your email instead.
- 1 reply
-
- steam-totp
- authCode
-
(and 2 more)
Tagged with:
-
https://github.com/DoctorMcKay/node-steamcommunity/releases/tag/v3.41.0
-
Those are system messages, not chat features. You can't send them yourself. No, you would lose all new chat functionality.
-
Steam's probably having an issue.
-
In the user event (or getPersonas), user.persona_state == SteamUser.EPersonaState.Away tells you if their status is set to "Away". And you can check if user.game_played_app_id is truthy to see if they're in-game.
-
The bot goes offline while checking inventory
Dr. McKay replied to PonyExpress's topic in node-steam-tradeoffer-manager
So this is happening because JavaScript is single-threaded, and your loop is taking too long. While the loop is running, the rest of the code can't keep the connection to Steam alive and do other housekeeping tasks. You'll need to figure out a way to get the time that loop takes down, perhaps by limiting how many items it will process at a time, or perhaps by using setImmediate periodically so the rest of the event loop can get processed. -
The first argument to client.chatMessage needs to be the SteamID of the user to whom you're sending the message.
-
I have no idea what trips that, but running a bot doesn't seem to have a significant impact on it.