Jump to content
McKay Development

Recommended Posts

Posted
So far I got this code inside of my client.on('webSession', (sessionid, cookies):

manager.on('sentOfferChanged', function(offer, oldState) {
	const partnerID = offer.partner.getSteamID64();

	console.log(`Offer #${offer.id} changed: ${TradeOfferManager.ETradeOfferState[oldState]} -> ${TradeOfferManager.ETradeOfferState[offer.state]}`);
	
	if(TradeOfferManager.ETradeOfferState[offer.state] == "Accepted"){ 
		
	  client.chatMessage(partnerID, "Thank you for trading with me!");
	  community.getSteamUser(partnerID, function(err, user){
		  if(err){
			  console.log(err);
		  } else{
		  user.comment("Thanks for trading with me", function(err){
			  if(err){
				  console.log(err);
			  }
		  });
		  }
	  });

Error I get:

The specified profile could not be found, even though I get the Steam ID by using offer.partner.getSteamID64()

Posted (edited)

Don't because:

 

 

1.) It's super annoying.

 

2.) It doesn't give any actual advertisement whatsoever.

 

3.) Bots get community banned for doing this.

 

 

However, if you still choose to do it just read the actual documentation.

> Either a SteamID object or a user's URL (the part after /id/)

aka

typeof id === 'string' ? "id/" + id : "profiles/" + id.toString()

Edited by TomYoki
Posted (edited)

Don't because:

 

 

1.) It's super annoying.

 

2.) It doesn't give any actual advertisement whatsoever.

 

3.) Bots get community banned for doing this.

 

 

However, if you still choose to do it just read the actual documentation.

> Either a SteamID object or a user's URL (the part after /id/)

aka

typeof id === 'string' ? "id/" + id : "profiles/" + id.toString()

I wasn't aware this was not allowed, because I see many card bots doing that. So thank you for the info & also the code!

 

Edit: On a second thought, I'll try to code a script to check if I already left a comment on a specific user's profile today, that way it won't be considered as spam

Edited by Go Fast

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