Coyeks
-
Posts
4 -
Joined
-
Last visited
Posts posted by Coyeks
-
-
offer.itemsToReceive contains an array of the items you'd receive if you accepted this offer. For each item in this array, check
appid
to make sure it's CS:GO andname
to make sure it's a key. For example:var allItemsAreGood = offer.itemsToReceive.every(function(item) { return item.appid == 730 && item.name == "CS:GO Case Key"; });
Thank you, appreciate it.
-
Set a language in your constructor if you haven't already, and then the item should have a
name
property you can check.Hey, thanks fro the reply, i have a language set and could you possibly give an example of how to check the name in the code i provided above? thanks
-
Alright so the title says it all, i'm fairly new to Steam bots.
I'm trying to make it so it only accepts CSGO keys i know the code below is horrible, but if someone could point me in the right direction it would help a lot.
offers.on('newOffer', function (offer) { console.log("New offer #"+ offer.id +" from "+ offer.partner.getSteam3RenderedID()); // Accept any trade offer from Admin. if (offer.partner.getSteamID64() === config.admin && appid === appid.CSGO){ console.log("ADMIN offered a trade. Trying to accept offer."); offer.accept(function (err) { if (err) { console.log("Unable to accept offer "+ offer.id +": " + err.message); } else { console.log("Offer accepted because ADMIN sent the offer"); } }); } else { //Otherwise deny it and message the user console.log("User "+ offer.partner.getSteam3RenderedID() +" offered an invalid trade. Declining offer."); offer.decline(function (err) { if (err) { console.log("Unable to decline offer "+ offer.id +": " + err.message); } else { console.log("Offer declined"); // Message the user client.chatMessage(offer.partner.getSteamID64(), "Invalid offer."); } }); } });
I know it also only accepts if its the admin, that's just for testing.
postUserComment
in node-steamcommunity
Posted
when ever i call postUserComment it returns "The settings on this account do not allow you to add comments" but the account can post comments to the profile manually.
Any ideas why?