Jump to content


Photo
Question

Trade Notifications Messages don't get cleared when...

node.js node-steam-user

Best Answer Dr. McKay , 19 February 2019 - 05:57 AM

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.

Go to the full post


  • Please log in to reply
6 replies to this topic

#1 roughnecks

roughnecks

    Advanced Member

  • Member
  • PipPipPip
  • 44 posts

Posted 13 January 2019 - 08:18 AM

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



#2 roughnecks

roughnecks

    Advanced Member

  • Member
  • PipPipPip
  • 44 posts

Posted 14 January 2019 - 01:34 PM

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.



#3 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 1,998 posts

Posted 14 January 2019 - 09:28 PM

Is your bot's persona online?



#4 roughnecks

roughnecks

    Advanced Member

  • Member
  • PipPipPip
  • 44 posts

Posted 15 January 2019 - 05:46 AM

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!');


#5 roughnecks

roughnecks

    Advanced Member

  • Member
  • PipPipPip
  • 44 posts

Posted 18 February 2019 - 08:23 AM

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


#6 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 1,998 posts

Posted 19 February 2019 - 05:57 AM   Best Answer

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.



#7 roughnecks

roughnecks

    Advanced Member

  • Member
  • PipPipPip
  • 44 posts

Posted 19 February 2019 - 06:13 AM

I see  :unsure:







Also tagged with one or more of these keywords: Question, node.js, node-steam-user

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users