-
Posts
73 -
Joined
-
Last visited
Posts posted by Vanilla
-
-
https://github.com/DoctorMcKay/node-steamcommunity/wiki/CSteamUser#invitetogroupgroupid-callbackI'm wondering where you found that method "inviteUserToGroup". I looked in the wiki for the SteamCommunity module and couldn't find that method. @Dr. McKay
-
using 'item.appid'Hello, how can I get the appID of a offer?
https://github.com/DoctorMcKay/node-steamcommunity/wiki/CEconItem#appid
-
Using steamcommunity editProfile.Thanks you so much, but how? I don't found any function
https://github.com/DoctorMcKay/node-steamcommunity/wiki/SteamCommunity#editprofilesettings-callback
-
So sometimes my bot is disconnected from steam, it reconnects and is shown as online and everything and then when a trade offer is sent to it, it outputs an error something along the lines "Error: Not Logged In". Unfortunately, I didn't save the error output. Hopefully, someone will know what I'm talking about, but I'll update this post when it happens again. My guess is that it has something to do with either steamcommunity or tradeoffermanager, probably the former.
How can I prevent it?
That means, tradeoffer-manager have invalid cookies, and you need to refresh cookies if that happened.
Use steamcommunity "sessionExpired" event to refresh tradeoffer-manager cookies
When you get "Error: Not Logged In", steamcommunity "sessionExpired" event will fired.
community.on("sessionExpired", function(err) { client.webLogOn(); //relogin to Steam or refresh tradeoffer-manager cookies //add your handling code here, for example: if (sendofferError == true){ //do stuff } }
Edit: If you want to kill cookies for testing purposes, you can add this in your code:
setTimeout(function(){ //for debugging purposes, kill cookies after 10 second console.log("rip cookies :("); community.setCookies(["steamLogin=1||invalid", "steamLoginSecure=1||invalid"]); manager.setCookies(["steamLogin=1||invalid", "steamLoginSecure=1||invalid"]); }, 10000);
-
As the picture below how can i check if the item name contain the tag 'Craft Item' ?
https://github.com/DoctorMcKay/node-steamcommunity/wiki/CEconItem#tags
You need to get individual item from offer, and after that just call "item.tags".
Since tags is an array, you might want to use loop to check if an item contain "Craft Item"
-
This the code i used on my bot, feel free to edit
If you use steam-user, those code should be works.
Don't forget that you need to logged in to chat so bot will listen to chat command.
client.setPersona(5); //put this on: client.on('loggedOn', function (details) {
-
Did you forgot to change identity secret / shared secret?
Also can you send trade offer manually?
-
Use 'newConfirmation' event to accept trade offer
https://github.com/DoctorMcKay/node-steamcommunity/wiki/Steam-Confirmation-Polling
-
Yes, only happens sometimes.I can't reproduce this. You say it only happens sometimes, not all the time for the same item?
I can't also reproduce this, i'm not really sure what's happen tbh..
Additionally, is there other way to check if an item marketable or not other than using 'item.marketable'?
-
Hello, it's happening again:
http://i.imgur.com/QGThmOj.png
21/05/17 - 14:10:52 - Rejecting Trade Offer from 76561198367819501 - Reason: Cross-Set 21/05/17 - 14:10:52 - [INFO] givenlength: (2) receivelength: (2) tagged: (0) nonmarketable1: (2) nonmarketable2: (0)
The offer object is in attachment.
Looks like both cards in "itemsToGive" is marketable false. But the item is actually marketable
http://steamcommunity.com/market/listings/753/639900-Mysterious%20Card%203
http://steamcommunity.com/market/listings/753/639900-Mysterious%20Card%2010
-
It's possible Steam occasionally returns bad information (wouldn't be unheard of). It would be more helpful to have a full json dump of the item in question when this happens.
Thanks, I didn't save the full JSON dump when it happen
I will reply this post when it's happening again.
edit: typo
-
Hello there, I found a weird problem when checking if an item is marketable or not
I'm running 1:1 Card Trade (same-set) bot, and additionaly also accept 1:1 from non-marketable cards.
The code I use to check if an item is marketable or not is something like thisoffer.itemsToReceive.forEach(function(item) { if ((item.type.includes("Trading Card") == true) && (item.marketable == false)){ itemBotReceive.push("Non-Marketable Trading Cards"); //Non-marketable cards will be pushed to new array } });
The problem is, when using above code, sometimes marketable cards will goes to non-marketable cards
This screenshot is perfect example for what I mean:
As you can see above, one of them is accepted, while the other one is rejected. Both trades come from same person
When I check the log it say:21/05/17 - 05:18:07 - Accepting (1:1) Trade Offer #2227108866 : (SteamID) 21/05/17 - 05:18:15 - Confirmed Trade Offer #2227108866 21/05/17 - 05:22:28 - Rejecting Trade Offer from (SteamID) - Reason: Cross-Set 21/05/17 - 05:22:28 - [INFO] givenlength: (1) receivelength: (1) tagged: (0) nonmarketable1: (0) nonmarketable2: (1)
Mysterious card "3" for some reason will got tagged as "Non-Marketable Cards", but it's clearly that the cards is marketable
---
Is this a bug or something? I can't reproduce this issue
It's been going on for pretty long time, but pretty rare (about 5% Trades will get rejected for same reason)
Thanks -
I currently don't have this event because I tough that steam-community event "sessionExpired" would be enough. When this event fires, I call steam-user client.webLogOn(), but this night I've noticed that when "sessionExpired" event gets called, it starts reconnecting, but doesn't fully reconnect: http://prntscr.com/fktl8y In this case my bot turns offline again and I have to restart it. I will try to add "disconnected" event, but what function exactly should I write there? Delete and re-create the session (client.webLogOn()) or totally log off from steam user and login again?
Something like this:
community.on("sessionExpired", function(err) { //client.webLogOn and stuff }); client.on('disconnected', function (eresult) { console.log("Disconnected from Steam. Reason '"+SteamUser.EResult[eresult]+" ["+eresult+"]'"); //do your magic });
node-steamcommunity 'sessionExpired' event will fires if your cookies is dead (but still connected to Steam)
node-steam-user 'disconnected' event will fires if your bot for some reason can't connect to Steam server.
For example, try log in your bot using your code with 'disconnected' event code above, and after that turn off your internet connection.
The log will say something like: "Disconnected from Steam. Reason 'NoConnection [3]'"
-
Do you have 'disconnected' event (from steam-user)?Hello, I own a trade bot. This evening I have noticed that my bot began to behave strangely. It starts disconnecting from Steam and changes its status to offline. Logs are totally clean. No errors. Also, I am using a function "webLogOn" to destroy expired session and re-create it. Do you have any suggestions?
It should show the reason why you get disconnected
-
Use 'inviteToGroup(userSteamID, groupSteamID)'do u have an auto invite all friends to a pecifik group? that i can add to my bot
It's possible to send a lot people to spesific group, but just like the wiki said: "sending automated group invites is a violation of the Steam Subscriber Agreement and can get you banned."
-
There's an event in steam-user for listening incoming trade invite.Also, is there a way to create a real time trade with node-steam-tradeoffer-manager? I dont see anything in the docs about it.
For real time trade, try using node-steam-trade
-
I suggest using node-steamrep. It's a lot more reliable then the notifications from Steam.
I never know that we have this libraries.
Thank you
-
This will accept ALL incoming group inviteHey may i have the full code fixed plzzz i really need this for my bot an ive searched everywhere
client.on('groupRelationship', function (steamID, relationship) { if (relationship == SteamUser.Steam.EClanRelationship.Invited){ client.respondToGroupInvite(steamID, true); } });
-
if(steamID == '76561197.....' || steamID == '76561.....'){
In case if you want the bot accept user command and admin command, you can try this example, or using switch-case:
var admin = "76561..."; //this is admin Steam ID client.on('friendMessage', function (steamID, message) { if((steamID == admin) && (message== "!command1")){ client.chatMessage(steamID, 'admin command 1'); } else if((steamID == admin) && (message== "!command2")){ client.chatMessage(steamID, 'admin command 2'); } else if(message== "!user1"){ client.chatMessage(steamID, 'user command 1'); } else if(message== "!help"){ client.chatMessage(steamID, '!help command'); } else { client.chatMessage(steamID, 'command not found, use !help'); } });
-
-
Hello there, I managed to make my bot edit their "Real Name' using editProfile node-steamcommunity, and I found a problem
Everytime I'm using "community.editProfile", it always removing one of my bot Profile Showcase.
The original is "Items Up For Trade" and Custom Info Box, but after calling editProfile, "Items Up For Trade" always gone and only leaving Custom Info Box.
Is this a bug or am I missing something? Because I can't find anything in wiki about Profile Showcase.
Thanks
Not sure if it's help, but here's part of code
community.editProfile({ "realName": "Bot Version: " +version, "background" : 4149974111, }, function(err) { if (err) { var log = (currentdate() + " - Failed to update RealName"); fs.appendFile("log.txt", log+ "\n", {flag: 'a'}, function(err) {}); console.log(log); } else { var log = (currentdate() + " - RealName updated: "+version); fs.appendFile("log.txt", log+ "\n", {flag: 'a'}, function(err) {}); console.log(log); } });
inviteUserToGroup not working(?)
in node-steamcommunity
Posted
> Non-object method name: inviteUserToGroup