roughnecks Posted January 13, 2019 Report Posted January 13, 2019 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 Quote
roughnecks Posted January 14, 2019 Author Report Posted January 14, 2019 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. Quote
roughnecks Posted January 15, 2019 Author Report Posted January 15, 2019 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!'); Quote
roughnecks Posted February 18, 2019 Author Report Posted February 18, 2019 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 Quote
Dr. McKay Posted February 19, 2019 Report Posted February 19, 2019 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. Quote
Recommended Posts
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.