Jump to content
McKay Development

Search the Community

Showing results for tags 'javascript'.

  • 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

Found 4 results

  1. Do you need help? Don't hesitate to DM me on discord then! (McMuffinDK#5901) I would love to help you the best i can
  2. If I want to connect my website and node.js server I would need to put the ip of the server in my source code but isn't this unsafe because everyone is able to see this if you use javascript, and people could like attack it or something? Also is using socket.io generally the 'best' way to connect a bot and a website or would using socket.io be called 'non-proffesional' and what other options exist? I also haven't seen a big site using socket.io so that makes me wondering, or do they hide it somehow?
  3. Hello, this is my code var offer = manager.createOffer(row.trade_url); offer.addTheirItem({"appid": 730, "contextid": 2, "assetid": row.assetid}); offer.send(function(err, status) { if (err) { console.log("[ERROR] Sending offer - " + err); } else { console.log("Offer #" + offer.id + " " + status); } console.log(status); }); Everything works, but can I check If he have mobile authentificator on?
  4. I have this code here mostly from the example in the steam trade offer manager. It accepts all trade offers fine (without any exceptions). I added some code where the bot would skip the trade offer if the bot didn't receive any items (a gift offer). I'm struggling to create the part of code where I can filter items and create the prices for them for buy orders and sell orders. Could anyone tell me the syntax for that? CODE SO FAR //TF2 TRADE BOTvar SteamUser = require('steam-user'); var SteamCommunity = require('steamcommunity'); var SteamTotp = require('steam-totp'); var TradeOfferManager = require('steam-tradeoffer-manager'); var fs = require('fs'); require('consoleplusplus') var client = new SteamUser(); var manager = new TradeOfferManager({ "steam": client, "domain": "example.com", "language": "en" }) var community = new SteamCommunity(); // Steam logon var logOnOptions = { "accountName": "username", "password": "password", "twoFactorCode": SteamTotp.getAuthCode("sharedSecret") }; if (fs.existsSync('polldata.json')) { manager.pollData = JSON.parse(fs.readFileSync('polldata.json')); } client.logOn(logOnOptions); client.on('loggedOn', function() { var logonmessage = "#magenta{LOGGED INTO STEAM SUCCESSFULLY}" console.info(logonmessage); }); client.on('webSession', function(sessionID, cookies) { manager.setCookies(cookies, function(err) { if (err) { console.error(err); process.exit(1); return; } console.info("Got API key: " + manager.apiKey); console.log("________________________________________________________________________________") }); community.setCookies(cookies); community.startConfirmationChecker(30000, "identitySecret"); }); manager.on('newOffer', function(offer) { console.info("New offer #" + offer.id + " from " + offer.partner.getSteam3RenderedID()); offer.accept(function(err) { if (err) { console.error("Unable to accept offer: " + err.message); } else { if(offer.itemsToReceive.length === 0) { // Gift offer console.info(offer.partner.getSteam3RenderedID() + " Offer #" + offer.id + " is a gift offer, skipping"); return; }else{ community.checkConfirmations(); console.log("Offer accepted"); } } }); }); manager.on('receivedOfferChanged', function(offer, oldState) { console.info(`Offer #${offer.id} changed: ${TradeOfferManager.ETradeOfferState[oldState]} -> ${TradeOfferManager.ETradeOfferState[offer.state]}`); if (offer.state == TradeOfferManager.ETradeOfferState.Accepted) { offer.getReceivedItems(function(err, items) { if (err) { console.error("Couldn't get received items: " + err); } else { var names = items.map(function(item) { return item.name; }); console.log("Received: " + names.join(', ')); console.log("________________________________________________________________________________") } }); } }); manager.on('pollData', function(pollData) { fs.writeFile('polldata.json', JSON.stringify(pollData)); });
×
×
  • Create New...