Jump to content
McKay Development

Recommended Posts

Posted (edited)

Hello.

1. If the bot receives a trade offer from user. then the bot makes a counteroffer.
2. If the user makes counteroffer, the bot should decline it.

So, The bot must decline offers that are counteroffers.

How can I implement this?
I did not find any data in TradeOffer object that could help me with this.

Are there any ideas how I should do this?

Maybe the bot should compare time? Llike if newOffer created time = offer with status "Countered" updated time then decline? Exam;e:

let trade = new SteamTradeofferManager()
let a

trade.on("newOffer", (offer) => {
	if (offer.created == a) {
		// decline
	} else {
		// create counteroffer
	}
})

trade.on("sentOfferChanged", (offer) => {
	if (offer.state == 4) {
		a = offer.updated
	}
})

 

Edited by PonyExpress
Posted

I could be wrong, but as far as I remember there's no concrete way to know that an offer is a counter offer. You could possibly check the offer created time and see if it closely matches the updated time of a previous offer sent to that user which has status Countered.

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