Jump to content
McKay Development

Search the Community

Showing results for tags 'node.js'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News & Announcements
    • Releases & Updates
  • Help & Support
    • General
    • Guides
    • node-steam-user
    • node-steamcommunity
    • node-steam-tradeoffer-manager
    • node-steam-session

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Skype


Location


Interests

  1. Node.js is a new thing for me, as I have only started learning it about yesterday. I've been attempting to build a trade bot the accepts trade offers as long as the items that are being received are valued more than the items of the bot. To find the value of items, I use steam-market-pricing. My question is, how do I identify what items the person is offering, and what the person wants to receive from the trade offer? Furthermore, how do I only accept these offers? Sorry if the questions are vague, I'll clear up if you don't understand. I'm working off of this code from a guide just to make my life a bit easier.
  2. Or do I have to remove it from that device and set it up via the bot like this: community.enableTwoFactor(function(err, response) { console.log(response); // So the shared secret, revocation code and the identity secret are in the response. How am I able to save it in a file instead of logging it and then saving it in a file? }); I hope there is a way of not having to remove my current device. My old phone broke so I have been waiting all week to be able to trade again since I linked my new phone.. x)
  3. hello. for example i am creating inctance of TradeOfferManager and begin listening event on. how can i stop listening event .on or other event?
  4. Is it possible to login with steamcommunity and use steam-user, for example to talk in chat and accept/decline tradeoffers?
  5. Hello, the title says it. How do I accept trades with mobile authenticator? I have looked on the Wiki but couldn't find it. Help is appreciated! x)
  6. As of December 2015, all users who are losing items in a trade must have the Steam Guard Mobile Authenticator enabled, or else the trade will be held for three fifteen days. It's also no longer possible to opt-out of trade confirmations. This means that effectively, all trading bots need a mobile authenticator and need to accept mobile trade confirmations. You don't need an actual physical phone to act as your mobile authenticator, however. Through the efforts of myself and others, you can emulate a mobile authenticator right from node.js, and also accept trade confirmations. Enabling a Mobile Authenticator The Steam Guard Mobile Authenticator provides two-factor authentication security (hereinafter "2FA") for your account, which is more secure than standard email-based Steam Guard. This is done using a "shared secret" which is known to both the Steam servers and to your authenticator. Both sides run this secret through an algorithm along with the current time, which produces a 5-character alphanumeric code. This code is only valid for 30 seconds, and can only be used once. Attempts to reuse a 2FA code (either through the Steam Client or by logging in on steamcommunity.com) will treat the code as incorrect and reject it. For this reason, you can't login more frequently than once in a 30-second period. Enabling 2FA is a three-step process. Link and verify a phone number with your Steam account. You can do this manually from your account page, or programmatically using node-steamstore. Call enableTwoFactor using either node-steam-user or node-steamcommunity. If successful, this will return an object containing a bunch of properties. You should save this entire object. You can call JSON.stringify on it safely to turn it into a string. You'll need the revocation_code in the future if you ever want to disable 2FA. At this stage, 2FA isn't enabled yet. Steam will send you an SMS containing a code which you'll need in step 3. Call finalizeTwoFactor using either node-steam-user or node-steamcommunity. You will need the value of the shared_secret property from the object returned in step 2, and the numeric activation code from your SMS. If successful, your Steam account now has 2FA.Logging in With a Mobile Authenticator If you have 2FA enabled, then for every login you will need to provide a twoFactorCode (unless you're logging in with node-steam-user using a loginKey). You can generate this code using node-steam-totp and your shared_secret which you obtained (and should have saved) when you enabled 2FA. Mobile-Confirming Trades You are now required to confirm all trades in which you lose items. If you don't have 2FA enabled, then these confirmations will go to your email and the trades will be held for fifteen days. If you do have 2FA enabled, then the confirmations must be accepted through Steam's mobile confirmation interface. You can also accept mobile confirmations through node.js. node-steam-tradeoffer-manager doesn't have anything built-in to accept mobile confirmations. This is because mobile confirmations encompass more than just trades -- market listings also require confirmation, and potentially other things in the future. node-steamcommunity can accept your confirmations for you. In order to accept mobile confirmations, you will need the identity_secret (not the shared_secret used for login) from when you enabled 2FA. The best way to do this is to call acceptConfirmationForObject right after each trade offer you send/accept or market listing you create.
  7. Hello! Is there any function to get user nickname with steamid? Greetings, Turska
  8. The 1st server is getting logged out if logging in with the same acc from another IP/serv. Possible fix? And another thing How to pass rememberPassword:true for login(details, callback)?
  9. Hello, Since the latest update, I receive "Unable to accept offer : Unknown state 2" when receiving a new offer. The trade does go through, it goes to accepted afterwards. But for some reason it always emits "Unknown state 2" aswell. Am I doing something wrong or is this a bug? manager.on('newOffer', function(offer) { console.log("New offer #" + offer.id + " from " + offer.partner.getSteam3RenderedID()); var steamid = offer.partner.getSteamID64(); offer.accept(function (err) { if (err) { console.log("Unable to accept offer: " + err.message); pusherTrigger.trigger('bot_status_ch', 'bot_status', { "message": "offline", "bot": BotID }); } else { steam.checkConfirmations(); console.log("Offer accepted"); } }); });
  10. i am trying to make cluster bot. I wanna have n bot, working in 1 deploy node js app. Can be conflict between session bots?
  11. Hi, I apologize if this question is not relevant as I am fairly new to Openshift and development of steam bots. I have used steamcommunity to develop a trading bot which handles incoming trade offers. I want to host it on Openshift and am following the firepowered tutorial (http://firepowered.org/developer/hosting-a-steam-bot-on-openshift-online/). SteamCommunity saves a steamguard.txt file on login in the directory where the code is present. Is it possible to use it on Openshift as it needs data to be on the data directory referred by env variable OPENSHIFT_DATA_DIR? Thank you. Regards, Bheem
  12. Hi, I know this is probably a silly question (and probably is in the documentation but my english is not that good), but How could I accept all my sent offers? I mean, I can grab my phone and accept one by one (I have a mobile authenticator for the bots), but how could I automatically accept the sent trade offers. I saw that for 2 factor auth I need to the use the totp (and I still trying to figure out how), but I didn't saw anything about auto accept. Sorry for the silly question.
  13. Hi! I need help with my bot. I want bot to only accept CSGO items but I have no idea where to start. I have read documentation but I can't find any help. Greetings, Turska
  14. Hello, I would like to know if i am doing something wrong here. I am trying to set up the node-steamcommunity to confirm the trade offers i've send. But it gives no error message whatsoever. I am listening for both events listed in the documentation here https://github.com/DoctorMcKay/node-steamcommunity/wiki/Steam-Confirmation-Polling#startconfirmationcheckerpollinterval-identitysecret but it never goes in any of them. Thank you in advance.
  15. Hello Dr, sometimes im living a http problem. For this problems, i want to request http, how its gonna be? And one more question, how can bot accept all friend requests?
  16. Hey all!, I have pasted my whole script below but please only pay attention to the confirmMobile(userSteamId, callback) function because it is the function that isn't working for me. My main problem (as the title suggests) is that the getConfirmations method only picks up trade offers that I have sent through steamcommunity. Any trade offers that I send through node do not come up. If there is anything that I did wrong please tell me as I have no idea what is wrong with the confirmMobile(userSteamId, callback) function. Any help is greatly appreciated!! var SteamTradeOffers = require('steam-tradeoffers'); var SteamCommunity = require('steamcommunity'); var SteamTotp = require('steam-totp'); var offers = new SteamTradeOffers(); var community = new SteamCommunity(); function confirmMobile(userSteamId, callback) { //This function is called after the trade offer is sent, please look at this function var unixTime = SteamTotp.time(); var confirmationKey = SteamTotp.getConfirmationKey("IDENTITYSECRET", unixTime, "conf"); community.getConfirmations(unixTime, confirmationKey, (err, confirmations) => { if (err) { callback(err); } else { console.log(confirmations); callback(null); } }); } function runBot(userSteamId, skinArray, callback) { // This function makes a trade offer, console.log(typeof userSteamId); if (!userSteamId || !skinArray) { callback(new Error("500error")); } else if (skinArray.length === 0) { callback(new Error("500error")) } else { var sendSkinArray = []; console.log("Skin array 8is: " + skinArray); for (var i = 0;i<skinArray.length;i++) { sendSkinArray.push({ appid: 730, contextid: 2, amount: 1, assetid: String(skinArray[i]) }); if (i === (skinArray.length -1)) { offers.makeOffer({ partnerSteamId: userSteamId, itemsFromMe: sendSkinArray, itemsFromThem: [], message: "Hey! This is the CSGO ACORN bot" },(err, response) => { if (err) { //If cookies have expired, then get new cookies from steamcommunity.com community.login({ "accountName":"USERNAME", "password":"PASSWORD", "twoFactorCode": SteamTotp.generateAuthCode("SHAREDSECRET") },(loginError, sessionID, cookies, steamguard) => { if (loginError) { console.log("err when trying to log inHELLOWO"); callback(new Error("500error")); } else { community.loggedIn((communityError, loggedIn) => { if (communityError) { console.log("err2 was: " + communityError); callback(new Error("loginFailed")); } else { if (loggedIn) { offers.setup({ sessionID:sessionID, webCookie:cookies, APIKey: "SHAREDSECRET", }); runBot(userSteamId, skinArray, callback); } else { callback(new Error("loginFailed")) } } }); } }); } else { console.log(response); confirmMobile(userSteamId, (err, data) => { if (err) { callback(err); } else { callback(null); } }); } }); } } } } community.login({ "accountName":"USERNAME", "password":"PASSWORD", "twoFactorCode": SteamTotp.generateAuthCode("SHAREDSECRET") },(loginError, sessionID, cookies, steamguard) => { if (loginError) { console.log(loginError); } else { community.loggedIn((communityError, loggedIn) => { if (communityError) { console.log("err2 was: " + communityError); } else { if (loggedIn) { offers.setup({ sessionID:sessionID, webCookie:cookies, APIKey: "APIKEY", }); runBot("USERSTEAMID", ["SKINASSETID"], (err) => { if (err) { console.log("There was an error"); } else { console.log("It worked!"); } }); } else { console.log("Could not log in"); } } }); } });
  17. If steam-tradeoffer-manager emit unknownOfferSent event this offer will appear in sentOfferChanged?
  18. I'm living this, but when i login to my bot not giving any error. What is the problem? My codes is just doing, login, getting cookies, getting api key, editing profile and changing status. Where is the bad thing? If you want i can post the codes.
  19. Hello Dr, again me, the bot is wanting steam guard code, every three times try. Look at the logs, and this is code, var SteamCommunity = require ("steamcommunity"); var SteamTotp = require ("steam-totp"); var fs = require ("fs"); var TradeOfferManager = require ("steam-tradeoffer-manager") var market = require ("steam-market-pricing") var steam = require ('steam-user') var client = new steam(); var code = SteamTotp.getAuthCode('code'); var logOnOptions = { "accountName": "mabot", "password": "mapass", "twoFactorCode": code }; var offer = new TradeOfferManager({ "domain": "steamcommunity.com/id/akagna", "language": "en", "pollInterval": 5000 }); // LOGIN PART client.logOn(logOnOptions); client.on('loggedOn', function(details) { console.log("Logged into Steam as " + client.steamID.getSteam3RenderedID()); client.setPersona(steam.Steam.EPersonaState.Online); client.on('steamGuard', function(code) { console.log("Confirmed!"); }); }); client.on('error', function(e) { console.log(e); }); client.on('webSession', function(sessionID, cookies) { console.log("Got web session"); }); client.on('accountLimitations', function(limited, communityBanned, locked, canInviteFriends) { var limitations = []; if(limited) { limitations.push('LIMITED'); } if(communityBanned) { limitations.push('COMMUNITY BANNED'); } if(locked) { limitations.push('LOCKED'); } if(limitations.length === 0) { console.log("Our account has no limitations."); } else { console.log("Our account is " + limitations.join(', ') + "."); } if(canInviteFriends) { console.log("Our account can invite friends."); } });
  20. Hello, i'm trying to do a simple login method using steam-community. The bot has 2FA enabled with a mobile device. I use the following code: var SteamCommunity = require('steamcommunity'); var steam = new SteamCommunity(); var SteamTotp = require('steam-totp'); var logOnOptions = { accountName: "accUsername", password: "accPassword", twoFactorCode: SteamTotp.generateAuthCode("mySharedSecret") }; steam.login(logOnOptions, function(err, sessionID, cookies, steamguard){ if (err) { console.log("There was an error logging in! Error details: " + err.message); process.exit(1); //terminates program } else { console.log("Successfully logged in as " + logOnOptions.accountName); steam.chatLogon(); manager.setCookies(cookies, function(err) { if (err) { console.log(err); process.exit(1); } }); } }); Well the problem is that when i'm trying to login with this code, console returns me Error: SteamGuardMobile, and as the documentation says this error means If your login failed due to Steam Guard and the user has app-based authentication enabled, the message property will be SteamGuardMobile. Login again and provide the app code as twoFactorCode to the details object. But the funny fact is I'm using the twoFactorCode on the details object, and my sharedsecret is correct. Why I'm having this issue? Thanks a lot
  21. Hello, Is there a way to know the assetID of the items received before it changes? Right now, I have 1 inventorybot and multiple tradebots. The inventorybot distributes the items to the different tradebots. When I send an item from my inventorybot to the tradebot, my flow is as follows: Flow of inventorybot : send item -> when accepted delete record in DB Flow of tradebot : receive item -> accept -> insert into database This is how I keep track of which items are in which bots. But there is data that only the inventorybot knows about some items, for example where I got the item from (Did I get it from bitskins, opskins or another seller). But that data is lost since I have to delete the record in DB. I would like to update the record instead of deleting and inserting a new one. I have no way to know which item in database I should update after it has been traded to anoter bot. This could be done with a " UPDATE ... WHERE assetid = ..." . But assetID changes after trade, so that is not an option. Am I missing something on how I should do this? Kind regards
  22. Hello, Bot did send trades, but steam was down and bot didn't confirm them Later, when steam cames back, how to confirm all that trades?
  23. Hi there. When I try to start tradeoffer-manager I have fail on login with error CAPTCHA. What is wrong?
×
×
  • Create New...