Manager events are not emmited
tomikjetu opened this issue · 9 comments
Hello, manager does not run any of events i've created.
manager.on("sentOfferChanged", function (offer, oldState) { //Code })
does nothing.
Sending offers and loading inventory works okay. But this or any other events are not emmited. What can i do? I haven't changed polling Interval (kept default),
The "sentOfferChanged" event was emmited after i sent from my main account offer to bot and bot accepted / declined it. In documentation is written it has to be emmited when bot's offer has been changed.
"receivedOfferChanged" does nothing
I am so confused
Show your full code.
My full code is 500 lines or more... What exaclty do you need to see?
My code:
const community = new SteamCommunity()
const manager = new TradeOfferManager({
steam: client,
community: community,
language: 'en'
//also tried pollInterval: 1000
})
client.on("webSession", (sessionid, cookies) => {
manager.setCookies(cookies)
//manager.apiKey = process.env.apiKey
community.setCookies(cookies)
community.startConfirmationChecker(10000, process.env.identitySecret)
})
some code with socket.io to create an offer and send it
Offer is sent and then i want to emmit this event when offer bot sent was accepted
manager.on("sentOfferChanged", function (offer, oldState) { //TODO test this
console.log("id:" + offer.id)
})
I accept offer bot sent but the event isnt emmited.
Add a callback to manager.setCookies
. There might be an error in there. If I had to guess, I'd say your account is limited.
Oh yes... My bot's account is limited... Whole the time could be the error
Error i got was Access Denied
Well, that's your problem.