-
Posts
73 -
Joined
-
Last visited
Posts posted by Vanilla
-
-
unless you got other method to get the ids :V
Yep.. "somehow" you need to know the id..
That's why you need to cache it when using getUserInventory
-
3. You add items using appid,contextid,assetid so i dont think it is possible to do it without getUserInventoryContents
It's possible without getUserInventory, but somehow you need to put appid, contextid, and assetid correctly.
-
How can i get my summary profile?
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); } });
-
one more question, can I erase the friendship after a while? for example, my bot accepts the friendship today at 1:00 p.m. and erases the friendship tomorrow at 1:00 p.m.?What is the code for this to work?
You might need a database for that (like Oracle, MySQL, MonggoDB).
I'm not sure how to do that though
-
I do not think you understood my objective.I want that when the person adds me to appear in the chat of the personHello (here the name of the person who added me)! Thanks for add me, if you need help write! Help
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');
-
Next time check forum, you can read my topic - now I'm having this same problem like you.
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
Using steamcommunity getSteamUser also works
https://github.com/DoctorMcKay/node-steamcommunity/wiki/SteamCommunity#getsteamuserid-callback
-
how fix that ?
Have you tried using EResult instead?
user.on('disconnected', function (eresult) { console.log("Disconnected from Steam. '"+SteamUser.EResult[eresult]+" ["+eresult+"]'"); });
-
Why i have an error 429, i wait 2 days and this problem didn't fix( This error started to showed 1 week ago
You're making too many request, slow down.
-
Hello, I was wondering if it's possible to know if friend-request has been accepted after sending an invite.
I looked through the module docs and couldn't find anything, but perhaps I've missed something?
Thanks in advance.
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).
-
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
-
-
No, that's wrong. Don't call counter() more than once. Call it once and store the result in a variable.
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 } }
-
Correct.
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 } }
-
offer.counter() returns a new TradeOffer object. You need to perform your changes on that TradeOffer that it returns.
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.I didn't think on that xD. But will it show me as connected on steam? I need to handle chat messages too
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
-
Hi all!
Is there any way to idle a game without showing it and just appear as connected in steam?
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
-
Anything wrong with this code ? it seems to return everything as false
Are you sure it's not this for the last line?
if (mkable === false && ts === false && cable === false) { // && means [AND], || means [OR] return false } return true
PS: I'm sorry if I got this wrong, I don't play TF2 -
With the code below, how do i make it return false if Not Usable In Crafting is found ? i couldnt make it to return true and false for this. Please help :c
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 thereLast question, when using the object method version(user.inviteToGroup) how does the script know who its inviting to the group? It's not like you can log into that account.
> inviteToGroup(userSteamID, groupSteamID)
Need Help with Hosting
in node-steam-user
Posted
Get some cheap VPS, use Raspberry pi, or create yourown server.