Jump to content
McKay Development

Multiple bots accounts (the shortest and the best method)


OczkoSX

Recommended Posts

Hi. I need to run many accounts (it may be even 100accs in the future) so I can't just copy methods and functions for every account. I was thinking about few solutions:

 

1) running separate instances of bot.js with given botID as a parameter (node bot.js [id]):

  - pretty easy

  - bots don't depend on each other, won't crash others

 

2) make a bot class and make an array:

  - if one bot crashes, the others too

  - easier then the first one

 

Which one do you think? I would go with the first one. How can I launch many instances of an app? I would need to check length of .json file and then make a for-loop. 

 

Best regards

Link to comment
Share on other sites

I would go with the first one. It's not quite as simple as making a bot class because you have to make sure that every steamcommunity function acted on each bot in parallel, which would obviously be difficult to do with that amount of bots (you might be able to create separate steamcommunity instances though I'm not very familiar with this).

 

Also if you're running that many bots you will need to use proxies to avoid rate limits otherwise you will get screwed fast.

Link to comment
Share on other sites

I would go with the first one. It's not quite as simple as making a bot class because you have to make sure that every steamcommunity function acted on each bot in parallel, which would obviously be difficult to do with that amount of bots (you might be able to create separate steamcommunity instances though I'm not very familiar with this).

 

Also if you're running that many bots you will need to use proxies to avoid rate limits otherwise you will get screwed fast.

 

 

 

And how would you run these instances? I need to check length of an array in .json file (bots' credentials) and then launch many bot.js with given id (node bot 0, node bot 1...node bot 90 etc.). I'm using PM2

Link to comment
Share on other sites

And how would you run these instances? I need to check length of an array in .json file (bots' credentials) and then launch many bot.js with given id (node bot 0, node bot 1...node bot 90 etc.). I'm using PM2

I don't like running my bot daemonized so I just use screen but if you're running that many you will probably have to.

 

There are several ways to do what you want, depending on how reusable/updatable you want it to be. The easiest would probably just to add a command line argument with the bot ID to your script. Then you can just edit one script to update all the bots, but they're not inherently reliant on each other. Of course you have to play with where everything is saving (poll data, etc.). To start all of the bots I would recommend just making a simple bash script, just use a for loop and change the id in the command line argument.

Edited by Axle
Link to comment
Share on other sites

I was thinking about bash script, but I can't get a json array length the simple way. I was thinking about making .js file and spawning child processes?

 

Theres not too much reason for needing the actual array length in the script, you can just set it to for loop the amount of bots you would need to start. Obviously you would have to edit this to account for adding bots, but if you need to restart your scripts constantly I wouldn't recommend daemons in the first place. I was thnking of using it  as a one time spawning script

Edited by Axle
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...