-
Posts
73 -
Joined
-
Last visited
Everything posted by Vanilla
-
Get some cheap VPS, use Raspberry pi, or create yourown server.
-
var id = ""; //either SteamID Object or customURL after /id/ community.getSteamUser(id, function (err, user){ if (err){ console.log(err); //some error } else { console.log(user.summary); } });
-
You might need a database for that (like Oracle, MySQL, MonggoDB). I'm not sure how to do that though
-
Like I said above, variable "name" is now availabe to use in above code Just add this code above console.log client.chatMessage(steamid, 'Hello ' +name+ ', thanks for add me, if you need help write !help');
-
Well, I didn't use "pollFailure" on my bot, and I use this solution for my bot (trying to send offer -> error not logged in -> steam-community "sessionExpired" called -> relogin using client.webLogOn(); -> use if/else and re-send trade offer)
-
Use "sessionExpired" event from node-steamcommunity, then relogin using node-steam-user "webLogon()". edit: this might help https://dev.doctormckay.com/topic/1134-not-able-to-respond-to-offers-because-not-online/?p=3786
-
client.on('friendRelationship', (steamid, relationship) => { if (relationship === 2) { client.addFriend(steamid); client.chatMessage(steamid, 'Hello! Thanks for add me, if you need help write !help'); //getting name using getPersonas client.getPersonas([steamid], function(personas) { var persona = personas[steamid.getSteamID64()]; var name = persona ? persona.player_name : ("[" + steamid.getSteamID64() + "]"); //You can use 'name' to show their name console.log("You add: " + name + " - " +steamid); }); } }); Pretty much like this
-
Use getPersonas https://github.com/DoctorMcKay/node-steam-user#getpersonassteamids-callback https://dev.doctormckay.com/topic/660-how-to-go-from-steam64-to-steam-username-the-name-currently-used-on-steam/?p=2080 Using steamcommunity getSteamUser also works https://github.com/DoctorMcKay/node-steamcommunity/wiki/SteamCommunity#getsteamuserid-callback
-
Disconnected from Steam with reason : Disconnected ?
Vanilla replied to mrxbell's topic in node-steam-user
Have you tried using EResult instead? user.on('disconnected', function (eresult) { console.log("Disconnected from Steam. '"+SteamUser.EResult[eresult]+" ["+eresult+"]'"); }); -
Possible to know if friend-request has been accepted?
Vanilla replied to TomYoki's topic in node-steam-user
https://github.com/DoctorMcKay/node-steam-user#friendrelationship client.on('friendRelationship', function(steamID, relationship) { if (relationship == SteamUser.Steam.EFriendRelationship.Friend) { //this user became our friend on Steam //do something } }); Check enum here: https://github.com/DoctorMcKay/node-steam-user/blob/master/enums/EFriendRelationship.js Just a heads up, if someone send you friend request, event will be called and "relationship" is: 2 (RequestRecipient). And if you accepted the friend request, the "friendrelationship" event will be called again and "relationship" is: 3 (Friend). -
Question How do I get comments in a steam profile?
Vanilla replied to Vanish's topic in node-steamcommunity
OP asking how to GET comment, not to posting comment. I dont think it's possible for now, you can check Dr.McKay answer here: https://dev.doctormckay.com/topic/1181-getting-all-commentsactivity-from-a-group/?p=3947- 4 replies
-
- node.js
- node-steamcommunity
-
(and 1 more)
Tagged with:
-
This might help: https://dev.doctormckay.com/topic/455-429-error/
-
How to counter incoming trade offer?
Vanilla replied to Vanilla's topic in node-steam-tradeoffer-manager
Lol, so that's why I'm unable to add new item. Now works like a charm, thanks. manager.on('newOffer', function(offer) { if (offer.partner.getSteamID64() == admin){ //Counter an offer by adding new item var counteroffer = offer.counter(); counteroffer.addMyItem({"appid": 753, "contextid": 6, "assetid": "5222324266"}); counteroffer.send(function(err, status){ if (err){ console.log("Error: "+err); } console.log("Status: "+status) }); //confirmation } } -
How to counter incoming trade offer?
Vanilla replied to Vanilla's topic in node-steam-tradeoffer-manager
Thanks, just successfully make a counter offer. I only need to add "counter()" everytime I want to counter an offer. This is the working counter offer code (for those who got same problem) manager.on('newOffer', function(offer) { if (offer.partner.getSteamID64() == admin){ //Counter an offer offer.counter().addMyItem({"appid": 753, "contextid": 6, "assetid": "5222324266"}); offer.counter().send(function(err, status){ if (err){ console.log("Error: "+err); } console.log("Status: "+status) }); //confirmation } } -
How to counter incoming trade offer?
Vanilla replied to Vanilla's topic in node-steam-tradeoffer-manager
So, I need to use offer.counter() to get tradeoffer object, make change on that, and send new trade offer? -
Hello, how did I counter an incoming trade offer? I know that I need to use "offer.counter()", but I don't know how to use it. I got this following code to counter an offer, but it will show an error "Cannot add item to an already-sent offer". manager.on('newOffer', function(offer) { if (offer.partner.getSteamID64() == admin){ //Counter an offer by adding new item offer.counter(); offer.addMyItem({"appid": 753, "contextid": 6, "assetid": "5222324266"}); //error here offer.send(function(err, status){ if (err){ console.log("Error: "+err); } console.log("Status: "+status) }); } } Can anyone show the correct code please? I would really appreciate it. Thanks
-
Don't use 'err' callback
-
Nope, you will show up as "Offline" and still idling the game.If you decided to do that, you can't use chat messages. There's other way. You can 'Offline' in client, but Online chat via web browser, it will show up as 'Online via web browser' and still idling the game Use steamcommunity 'chatLogon();' https://github.com/DoctorMcKay/node-steamcommunity/wiki/Steam-Chat#chatlogoninterval-uimode
-
Put your "client.setPersona" as offline (0), and play whatever game you're idling client.setPersona(0); //"0": "Offline", "1": "Online", "2": "Busy", "3": "Away", "4": "Snooze", "5": "LookingToTrade", "6": "LookingToPlay" client.gamesPlayed(753); //playing app 753
-
Those function should works This is how you call function craftable(item) offer.itemsToReceive.forEach(function(item) { if (craftable(item) == false){ //item is Not Usable in Crafting } else { //item is Usable in Crafting } }); //do same with itemToGive
-
If you're talking about steam-user 'inviteToGroup', you can pass the SteamID there https://github.com/DoctorMcKay/node-steam-user/blob/master/README.md#invitetogroupusersteamid-groupsteamid > inviteToGroup(userSteamID, groupSteamID)