sNIP Posted October 2, 2019 Report Posted October 2, 2019 I kept getting 403 from my VPS server, I tried testing 5 bots yesterday, everything was fine, but since I woke up on the next day, I kept getting 403 on both community and steam store, but the bot logs in fine. client.on("webSession", (sid, cookies) => { manager.setCookies(cookies); community.setCookies(cookies); // this is for keeping the bot in the steam network: setTimeout(function(){ setInterval(function () { client.webLogOn(); }, pollRate.webLogOn); },pollRate.webLogOn)});pollRate.webLogOn is 1000 * 60 * 5I honestly do not know what is happening, since this is the third time I got permanently 403'ed on ip. I do not do anything malicious, I do not add friends, I do not send offers, I just tried to chat with the bots.Really looking forward for some help Quote
Dr. McKay Posted October 2, 2019 Report Posted October 2, 2019 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. Quote
sNIP Posted October 2, 2019 Author Report Posted October 2, 2019 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.I wanted to log-in every 5 minutes, is this a problem? Should I move : setTimeout(function(){ setInterval(function () { client.webLogOn(); }, pollRate.webLogOn); },pollRate.webLogOn)out of:client.on("webSession", (sid, cookies) => { manager.setCookies(cookies); community.setCookies(cookies); // This is where the setInterval Was }); Quote
Dr. McKay Posted October 2, 2019 Report Posted October 2, 2019 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. Quote
sNIP Posted October 3, 2019 Author Report Posted October 3, 2019 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.Sure? I though that if I need to use steam-community I need to constantly login in in order to not receive "Not logged" in error Quote
Dr. McKay Posted October 3, 2019 Report Posted October 3, 2019 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. Quote
Recommended Posts
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.