Jump to content
McKay Development

Recommended Posts

Posted

When I send an offer from the bot to the user and the user accepts and confirms with the mobile the bot's account receives the item but no event is launched on bot.
Polling Data manually every 2 seconds shows that the offer is shown in pollData in state 2 still. Also no other events seem to work for me (EG: .on("debug",console.log) ). Can I have made a mistake that crashed the events?

My code looks something like this

 

console.dir("logged");
var manager = new SteamTrades({
	"community": bot.community, // Polling every 30 seconds is fine since we get notifications from Steam
	//"domain": "example.com", 
	"pollInterval": 5000,
	"language": "en" // We want English item descriptions
});
manager.on('sentOfferChanged',function(offer, oldState) {
	console.dir("sentOfferChanged");
	console.dir(offer);
});
manager.on('pollFailure',function(err){
	console.log("failed to poll");
	console.log(err);
});
manager.on('pollData',function(pollData){
	console.log("pollData ",pollData);
});
manager.on('debug', console.log);
live_bots[bot.index].manager = manager;

Posted

I'm not sure I 100% understand. Let me clarify a couple things.

  1. SteamTrades is what you get back from require('steam-tradeoffer-manager'), yes?
  2. Are you calling manager.setCookies anywhere?
  3. What's your console output?
Posted

1) SteamTrades is actually var SteamTrades = require("steam-tradeoffer-manager");  so just bad naming.
2) no, I only create the trade manager object after it's already logged via a Steam Community by passing the community object (I assumed this step also takes the cookies ? )
3) For the events none, for pollData I print with an interval is something like
{ sent: { '1389220944': 2 } }

So Trad is still in state 2

Posted

Yeah, nevermind , I'm stupid. Now I manually set the cookies and it works. I don't know why I assumed passing community will automatically take the cookies from it. Anyway Thanks a lot.  This can be closed.

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...