node-steam-bot-manager
node-steam-bot-manager copied to clipboard
Getting error when sentOfferChanged event emits
When sentOfferChanged event emits I'm getting this type of error: ''error: Error: No API-Key set (yet)", that's why I can't get new state of the tradeoffer. I am using callback similar to one provided in examples. Can you help me to solve this problem?
The bot account you are using does not have an API key. Try to login to account at http://steamcommunity.com/dev/apikey if you are unable to generate an API key it means u need to spend $5 USD to enable API key. Try it, and update me on what happens.
I've already added API key for main account in config, but I am running 3 bots through BotsManager. How can I set up keys for all of them?
Oh, you will need to access that page for every account. In a future update I will add a way to automatically register for API key for accounts. I will place this Issue as a WIP for now, and update it when I add the feature.
In the debug.log, what message do you get when you login? Is it something like the following: Failed to get API Key - TradeOverflowChecking disabled for "ACCOUNT NAME" & getOffers call disabled
If it is.. That would usually mean that the account is a limited account (https://support.steampowered.com/kb_article.php?ref=3330-IAGK-7663)
If you are logging in and out a lot, that error could also show up.
If you think the account is not limited, tell me... I will try to add further error logging for that section so we can pinpoint the issue.
In debug.log I get actually this line after account is logged in.
From link that you've provided, I think that one of my accounts is limited because we never purchased anything from it. Sorry for bothering you and thanks for your reply.
After I added 5$ to my Steam wallet, it become even worse. I have the same problem and getting messages you mentioned, but errors appears periodically (after bot login). When they log in for the first time, my log is clear from error messages, but after relogin I see this "Failed to get API Key - TradeOverflowChecking disabled for "ACCOUNT NAME" & getOffers call disabled" from several bots, that was activated a long time ago. And this problem can be solved by relogin.
Uhh. Ok stop thr bots for a few minutes. You may have been ratelimited by Steam. Which is why bots the worked before are now not working. I'd say 30 minutes should be enough for the rate limit to stop.
Check and tell me what happens.
Yeah, I think they were rate limited and that caused an errors. How can I detect this state? I found event in source code for botAccount being rateLimited and you are changing a property in bot object. Do you think it will be enough to check from time to time this property and logout bot when he reaches this limit?
I do not recommend to use it fully, as I have not fully handled this situation. If you wanted to come up with your own, you can copy the handling such as its done here
In that block, I basically add a task to a queue if its detected as ratelimited. Then after a few minutes I process all the tasks that were added to queue because of rate limit.