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. Hey. Can someone tell my why my code not gives any info on console? I only see "connected to steam" and nothing more, even if i send trade offer to this steam account. const SteamUser = require('steam-user'); const TradeOfferManager = require('steam-tradeoffer-manager'); const Bot = new SteamUser(); const TradesManager = new TradeOfferManager({steam: Bot, pollInterval: 1000, language: 'pl'}); Bot.logOn({ accountName: "<myaccountname>", password: "<mypassword>" }); Bot.on('loggedOn', () => { console.log("connected to setam"); Bot.setPersona(SteamUser.Steam.EPersonaState.Online); }); TradesManager.on('newOffer', Offer => { console.log("new offer detected"); }); TradesManager.on('unkownOfferSend', Offer => { console.log("new offer detected"); });
  2. Say I want to create an offer but need to add just Trading Cards to it, how do I select them? I already know about appid, contextid and "item_class_2" but I need a working example after I loaded my Inventory, which has 4 [Object] inside "tags": CEconItem { appid: 753, contextid: '6', assetid: '10305554518', classid: '1496965455', instanceid: '0', amount: 1, pos: 30, id: '10305554518', background_color: '', icon_url: 'IzMF03bk9WpSBq-S-ekoE33L-iLqGFHVaU25ZzQNQcXdA3g5gMEPvUZZEaiHLrVJRsl8vGuCUY7Cjc9ehDNVzDMCeHqtjCQrcex4NM6b8wT1tePGP3j2fSSCJizYG1s1RLtXYTzc9zSjsL-QQj6dE-wkEggGfvQA8GFPPZzbNhM_1YcK_GPhwwp3DhFucMpUdAqp9X0eMLoglXVEd59RmXWjJpDc1F5hYUA8W-2yBLzHbdLzlSYhCxtiGvEYMYOXsXDyuMmmfLGLLIM8gGfI', icon_url_large: 'IzMF03bk9WpSBq-S-ekoE33L-iLqGFHVaU25ZzQNQcXdA3g5gMEPvUZZEaiHLrVJRsl8vGuCUY7Cjc9ehDNVzDMCeHqtjCQrcex4NM6b8wT1tePGP3j2fSSCJizYG1s1RLtXYTzc9zSjsL-QQj6dE-wkEggGfvQA8GFPPZzbNhM_1YcK_GPhwwp3DhFucMpUdAqp9X0eMLoglXVEd59RmXWjJpDc1F5hYUA8W-2yBLzHbdLzlSYhCxtiGvEYMYOXsXDyuMmmfLGLLIM8gGfI', descriptions: [ [Object] ], tradable: true, owner_actions: [ [Object], [Object] ], name: 'Santa Claus', type: 'Solitaire Christmas. Match 2 Cards Trading Card', market_name: 'Santa Claus', market_hash_name: '428510-Santa Claus', market_fee_app: 428510, commodity: true, market_tradable_restriction: 7, market_marketable_restriction: 7, marketable: true, tags: [ [Object], [Object], [Object], [Object] ], is_currency: false, fraudwarnings: [] }, CEconItem {
  3. Hi, so I wrote a few codes to my bot to make it send me a message with offer id included once there's a need for the background check. But I don't know how or is there a way to make it accept the trade offer through providing the trade offer id to the bot. const parseAdminMessage = (message) =>{ if (message.substring(0,8) == '!accept '){ var offerid = message.substring(8); console.log(offerid); //It can show the correct offerid here but i dont know how to make it accept the trade by the offerid } //This is what I used to accept normal trade offer with the offer status const acceptTradeOffer = (offer) => { offer.accept(false, function(error, status) { if (error) { logger.error(`| OFFER RECEIVED |: ID#${offer.id} has failed trying to accept it. Reason: Offer is no longer valid.`); return 'Badass'; } else if (status === 'pending') { logger.info(`| OFFER NEEDS CONFIRM | : ID#${offer.id} is accepted but needs confirmation`); var confCount = 0; function confirm(idSecret, idOffer) { community.acceptConfirmationForObject(idSecret, idOffer, function(error) { confCount++ if (error) { if (confCount < 4) { confirm(idSecret, idOffer); } else { logger.error(error); logger.fail(`| OFFER RECEIVED | : ID#${offer.id} has failed trying to confirm it. Reason: Offer is no longer valid.`); return 'done'; } } else { return 'done'; } }); } confirm(config.identity_secret, offer.id); } else { return 'done'; } }); }
  4. I write the code so when the bot log on the account it gives me the info of the inventory ( I think i did that xd) manager.loadInventory(753, 3, true, (err, inventory) => {console.log(inventory);}) When i open the bot the console says loged onundefined Help ?
  5. I have problem: 2019-01-14T16:31:25.036Z - error: Error polling for trade offers: Error: socket hang up2019-01-14T18:31:43.234Z - error: Error polling for trade offers: Error: socket hang upMy server:- Ubuntu 14.04 Plesk (64bit)- I use nodejs server with express + ssl My suuport told me do this ( https://support.plesk.com/hc/en-us/articles/115002107425--HUB-503-Service-Unavailable-on-Plesk-server ). After i do this: (set Default site to none via Plesk: Tools & Settings>IP Addresses> your_IP_Address ).All this didn't help me, what i need do?
  6. Hello, I'm using Steam card bot, but lately I got weird problem with memory usage. Usually process using about 200MB RAM, but lately I got a lot of cards - about 100,000 and I did a lot of trades, my VPS is limited to 1GB memory, and my process going up to 1000MB+ and killing my VPS session.
  7. let client = new SteamUser(); community = new SteamCommunity({ "request": Request.defaults({"rejectUnauthorized": false}) }); manager = new TradeOfferManager({ steam: client, community: community, language:'en' }); if (config.autologin == 1) { client.logOn({ "accountName":config.username, "password":config.password, "twoFactorCode": SteamTotp.generateAuthCode(config.sharedse) }) } else { var rl = Readline.createInterface({ input: process.stdin, output: process.stdout }); rl.question("username: ", function(name) { var username = name; rl.question("password: ", function(pass) { var password = pass; client.logOn({ "accountName":config.username, "password":config.password, "twoFactorCode": SteamTotp.generateAuthCode(config.sharedse) }) }); }); } client.setOption('promptSteamGuardCode',true);//true代表手动输入令牌,false代表使用2FA文件 client.on('loggedOn',() => { console.log('\n### Logged into Steam\n## steamid64:'+client.steamID+'\n## play game:'+config.playgame+'\n## trademode:'+config.trade+'\n## invitmode:'+config.invite); client.setPersona(SteamUser.Steam.EPersonaState.Online); client.gamesPlayed(config.playgame); botid64 = client.steamID; botid3 = client.steamID.getSteam3RenderedID() }); client.on('webSession', function(sessionid, cookies) { manager.setCookies(cookies); community.setCookies(cookies); }); is there any possible i can accept the tradeoffer with out 2FA sharedse? in some reason, i lose my sharedse, i gave it for a tradesite, and it can help me to send skins to other peole, and i can get the code when i want to login. and i make this bot can accept the offer when he got a tradeoffer,it works Just after logging in, but After a while 30mins or 1hours he can't accept the offer any more, and it just show "Unable to accept offer: Not Logged In"
  8. community.acceptConfirmationForObject(identitySecret, offer.id, function(err) { if(err){ console.log(chalk.red("Confirmation Failed for " + offer.id + ": " + err)); } else { console.log(chalk.green("Offer " + offer.id + ": Confirmed!")); } }); How can I delay this ^ for a couple seconds, avoiding it being fired earlier than offer.accept (which is right before)? I know this is more a coding issue rather than module's issue but I'm beginning to code in js and this async stuff hurts Thanks
  9. I got a output from: client.getPublishedFileDetails(1607555098, (err, results) =>{ console.log(results);});So my Question is, can you like artworks with this module or do i have to write a request function?Thanks for your help
  10. Any way add game like CS GO (ID 730) in my new account use node ? Now my HB works only if i run 1 time game. After this HB works perfect.
  11. Hello My bot is not running. I send an offer to it and then start it. Trade offer gets accepted but I get the error message "This trade offer is no longer valid." It's happening when retrieving UserDetails: if (offer.itemsToGive.length === 0) { offer.getUserDetails((err, me, them) => { if (typeof (them) !== 'undefined') { donator = them.personaName; console.log(`donator is: ${donator}`); } else { console.log(err); } }); because I'm not getting donator's name. This is my console.log: Error: This trade offer is no longer valid. at SteamCommunity._checkTradeError (D:\Portable\Birba\node_modules\steamcommunity\components\http.js:144:13) at Request._callback (D:\Portable\Birba\node_modules\steamcommunity\components\http.js:52:80) at Request.self.callback (D:\Portable\Birba\node_modules\request\request.js:185:22) at Request.emit (events.js:182:13) at Request.<anonymous> (D:\Portable\Birba\node_modules\request\request.js:1161:10) at Request.emit (events.js:182:13) at Gunzip.<anonymous> (D:\Portable\Birba\node_modules\request\request.js:1083:12) at Object.onceWrapper (events.js:273:13) at Gunzip.emit (events.js:187:15) at endReadableNT (_stream_readable.js:1094:12)Donation accepted. Status: accepted. Problem is, I'm posting a comment on bot's profile upon successful incoming donation and if there are offers BEFORE I run the bot, comments are not posted, since there's a check on "donator" and it doesn't return. BUT: If I keep the bot running and then send one more offer, it gets accepted and all is working fine without errors. donator is: roughnecks Donation accepted. Status: accepted. Comment Posted
  12. Hello, I have tried multiple github release (from simple javascript to automate advanced json etc). Tested the newest node, npm, node steam and 0.6.8 steam. I can not login with my correct steam credentials on virtual server. I just wanted to idle some hours on 2 titles. Has something happened recently, do they block connections? I cannot pass thru sucessfuly with: steamClient.connect();steamClient.on('connected', function() { steamUser.logOn({ account_name: 'MY_STEAM_LOGIN', password: 'MY_PASSWORD' });}); No guard mails arrive neither... Can you help me please?
  13. Hello. I want to ask about the new chat things like /spoiler /random /code etc.. or the old chat emotes How the bot can use them?
  14. Hello, Is it possible to know if a game has trading cards from its appid? thanks
  15. Guest

    fix for handlers

    Hi, i fixed my issue https://dev.doctormckay.com/topic/1949-node-steam-user-v-4/page-2 The error was found in existing handlers checking. If you'll use a few accounts you can see that handlers length will be equal to accounts count. You will be able to add this code in your module for fix this https://github.com/DoctorMcKay/node-steam-user/blob/v4/components/classes/HandlerManager.js#L21 if( this._handlers.hasOwnProperty(msg) && this._handlers[msg].length >= 1 ) { return; }P.S. In the steam-user v 4.0. don't work method gamesPlayed() . How can i fix it ? UPDATE: login with steamguard don't work too. Always get error "Error: Already logged on, cannot log on again"
  16. I'm not sure about steam-tradeoffer-manager, maybe my problem is related to steam-user.I always received the text of errors (ERR) in English. But after launching a third-party program, now i get them in another language. let client = new SteamUser(), manager = new TradeOfferManager({ "steam": client, "language": "en" }), community = new SteamCommunity(); //... let t = manager.createOffer(SID); t.getUserDetails((ERR, ME, THEM) => { if (ERR) { console.log("cant trade: " + ERR); // <<< not in English } else if (ME.escrowDays == 0 && THEM.escrowDays == 0) { console.log("all good"); } else { console.log("escrowDays"); } }); How can I return the language to English? (Global) And can I get errors in a specific language if need?
  17. leoptu

    HELP

    I do not know if this is the right area for this, I'm new here .. But someone has available, some kind of automatic Steam Account Creator?
  18. Guest

    node-steam-user v 4

    Hi, when do you planning release node-steam-user v 4 ?
  19. Hi, how can i create a new proto for my method ? For example i need to use method FriendsList.GetFriendsList#1 I use client._sendUnified("FriendsList.GetFriendsList#1", { bConstMethod: !0 }, body => { console.log(body) })But i get the error "Cannot read property 'encode' of undefined". What i need to do for using my methods through steam-user ?
  20. Hello, sorry for stupid post but I have question why after use this code second time console.log print the same information twice? 3 turns on 3 times when I use in other place 'loggedOn' I see again console.log(this.informations) in other function. Someone can tell me why and what I can to do with that? Sorry for my rip English and code. { let p = new Promise((resolve,reject)=>{ this.steam.logOn(this.account_details); this.steam.on('loggedOn', () => { this.steam.setPersona(SteamUser.Steam.EPersonaState.Online); this.informations.steamID=this.steam.client.steamID; this.informations.accountid=this.steam.steamID.accountid; console.log(this.informations); this.steam.logOff(); setTimeout(()=>{ resolve(true); },1000); }); }); return p.then((resolve)=>{ console.log(`...`); }); } Console:
  21. Hi, it is possible to set API? Trade-offers: this.apiKey = null; this._community.getWebApiKey(this._domain, (err, key) => { if (err) { callback(err); return; } this.apiKey = key; callback(); }); I can make a pull request to change this.apiKey = (options.apiKey || null); Or there is a reason for not giving option to pass api key?
  22. Guest

    Display link like steam

    https://gyazo.com/10cec7112e61627598031bf00b26c388 When I send a link through node steam-user it just send the text, when I send a link through Steam, then it is displayed in expanded form, how can I send the link so that it appears as a steam?
  23. Hi, im sorry to bother you but i need a litte bit of help. I need to find, how to get my sended offers and to be honest, I dont even know where to start, what function use and even if its possible or if i will need o save every trade i send. Thank you
  24. I'm running a bot and the majority of trade offers are not going through. The bot logs in and handles expired sessions like this: let client = new SteamUser(); let community = new SteamCommunity(); let manager = new TradeOfferManager({ community: community, steam: client, domain: "example.com", language: "en", pollInterval: 2000 }); let logOnOptions = { "accountName": data.username, "password": data.password, "twoFactorCode": SteamTotp.getAuthCode(data.shared_secret) }; client.logOn(logOnOptions); client.on('loggedOn', function() { console.log("Logged into Steam"); client.setPersona(SteamUser.EPersonaState.Online); }); client.on('webSession', function(sessionID, cookies) { manager.setCookies(cookies); community.setCookies(cookies); console.log("weblogon") }); community.on("sessionExpired", function(err) { console.log("## Session Expired"); client.webLogOn(); }); The bot gets new offers with manager.on('newOffer', function(offer) { , makes a simple request using https://www.npmjs.com/package/request and calls offer.getUserDetails. An offer is accepted like this: offer.accept(accept(offer, 1)); These are the two functions that handle accepting and confirming trades: function confirm(offer, count) { return function(err) { if (err) { if (count < 20) { console.log(err); setTimeout(community.acceptConfirmationForObject, 10000, data.identity_secret, offer.id, confirm(offer, count + 1)); } else { console.error("CONFIRM FUNCTION: "); console.error(err); } } } } function accept(offer, count) { return function(err, status) { if (err) { if (count < 20) { console.log(err); setTimeout(offer.accept, 10000, accept(offer, count + 1)); } else { console.error("ACCEPT FUNCTION: "); console.error(err); } } else { if (status === "pending") { community.acceptConfirmationForObject(data.identity_secret, offer.id, confirm(offer, 1)); } } } } Whenever I run the code it works for a few hours accepting offers and confirming them. Then offer comes in and the sessionExpired and webSession events are emitted twice. Error: Cannot accept an unsent offer happens every time it tries to accept the offer. This from stdout (it also logs the timestamp): 16:31:23 Error: Not Logged In at SteamCommunity._checkCommunityError (/home/user/bot/node_modules/steamcommunity/components/http.js:128:9) at Request._callback (/home/user/bot/node_modules/steamcommunity/components/http.js:51:88) at Request.self.callback (/home/user/bot/node_modules/request/request.js:185:22) at emitTwo (events.js:126:13) at Request.emit (events.js:214:7) at Request.<anonymous> (/home/user/bot/node_modules/request/request.js:1161:10) at emitOne (events.js:116:13) at Request.emit (events.js:211:7) at Gunzip.<anonymous> (/home/user/bot/node_modules/request/request.js:1083:12) at Object.onceWrapper (events.js:313:30) 16:31:23 ## Session Expired 16:31:23 ## Session Expired 16:31:23 Error: Not Logged In at SteamCommunity.manager._community.httpRequestPost (/home/user/bot/node_modules/steam-tradeoffer-manager/lib/classes/TradeOffer.js:483:25) at Request._callback (/home/user/bot/node_modules/steamcommunity/components/http.js:67:15) at Request.self.callback (/home/user/bot/node_modules/request/request.js:185:22) at emitTwo (events.js:126:13) at Request.emit (events.js:214:7) at Request.<anonymous> (/home/user/bot/node_modules/request/request.js:1161:10) at emitOne (events.js:116:13) at Request.emit (events.js:211:7) at IncomingMessage.<anonymous> (/home/user/bot/node_modules/request/request.js:1083:12) at Object.onceWrapper (events.js:313:30) 16:31:23 weblogon 16:31:24 weblogon 16:31:33 Error: Cannot accept an unsent offer at Timeout.TradeOffer.accept [as _onTimeout] (/home/user/bot/node_modules/steam-tradeoffer-manager/lib/classes/TradeOffer.js:451:23) at ontimeout (timers.js:502:15) at tryOnTimeout (timers.js:323:5) at Timer.listOnTimeout (timers.js:290:5) 16:31:43 Error: Cannot accept an unsent offer at Timeout.TradeOffer.accept [as _onTimeout] (/home/user/bot/node_modules/steam-tradeoffer-manager/lib/classes/TradeOffer.js:451:23) at ontimeout (timers.js:502:15) at tryOnTimeout (timers.js:323:5) at Timer.listOnTimeout (timers.js:290:5) ... etc What am I doing wrong?
  25. Error: Already logged on, cannot log on again Why crashing script? :// after hours
×
×
  • Create New...