Jump to content
McKay Development

Recommended Posts

Posted

Hello

 

With new steam chat we get a trade notification chat message together with any incoming offer from a friend: https://i.imgur.com/PV4TgEu.jpg

 

My problem is that when I'm using this code:

//Chat Messages Check

//This will fire when we receive a chat message from ANY friend
client.on('friendMessage', function(steamID, message) {
	client.getPersonas([steamID], function (personas) {
		console.log('Friend message from ' + personas[steamID]["player_name"] + ': '  + message);
	});
});

Bot's notifications aren't cleared (there is one for every trade offer); so my question is, there's a way to keep that code and clear trade notifications altogether (maybe something which fires after a trade is received)?

 

Thanks

Posted

My problem is that when I'm using this code:

//Chat Messages Check

//This will fire when we receive a chat message from ANY friend
client.on('friendMessage', function(steamID, message) {
	client.getPersonas([steamID], function (personas) {
		console.log('Friend message from ' + personas[steamID]["player_name"] + ': '  + message);
	});
});

Bot's notifications aren't cleared

 

 

My bad. Most probably that isn't the cause but failed offers are; I mean offers which don't go through because they're canceled or something.

 

I still need a way to get rid of those notifications, if anyone knows how to do do it.

Posted

If "looking to Trade" counts as online, then yes, it is.

client.setPersona(5); //"5": "LookingToTrade" -- https://github.com/DoctorMcKay/node-steam-user/blob/master/enums/EPersonaState.js
client.gamesPlayed('Accepting Junk and Making Friends!');
  • 1 month later...
Posted

Lately all notifications aren't cleared and I also get log messages in console, like:

 

[12:48:34] [LOG]    Friend message from roughnecks: [tradeoffer sender=xxxxx id=xxxxxx][/tradeoffer]
 
Did something change? Any way to fix it? Thanks
Posted

No, there is no way to suppress those messages from coming in when you receive a trade offer. Eventually I'm sure I'll add a method you can use to mark those as read, but for the time being there's no way to clear them in a bot.

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