Search the Community
Showing results for tags 'node-steamcommunity'.
-
Hello Error: Must be logged in before trying to do anything with confirmations I get this error when executing code in BAS (Browser Automation Studio) [[IDENTITY_SECRET]] = JSON.parse([[FILE_CONTENT]]).identity_secret var SteamTotp = require('steam-totp'); [[code2]] = SteamTotp.generateConfirmationKey([[IDENTITY_SECRET]]); [[code3]] = SteamTotp.getConfirmationKey([[code2]]); [[TIME]] = SteamTotp.time([[timeOffset]]); var SteamCommunity = require('steamcommunity'); var community = new SteamCommunity(); var Steam = require('steam-client'); var client = new Steam.CMClient(Steam.EConnectionProtocol.TCP); var TradeOfferManager = require('steam-tradeoffer-manager'); var manager = new TradeOfferManager(); client.on('webSession', (sessionID, cookies) => { manager.setCookies(cookies, function (err) { if (err) { logger.error(err) //игнор.прав process.exit(1); } }); community.setCookies(cookies); community.startConfirmationChecker(10000, [[code3]]); }); var time = [[TIME]]; var confKey = [[code3]]; var allowKey = [[code3]]; community.acceptAllConfirmations(time, confKey, allowKey, function(err, confs){ if(err){ res.sendError(err); return; } if(confs == null) confs = []; res.sendSuccess(confs); });
-
Hello, I released some donation/trash bot and most of time everything is working fine, processing a lot of trades without any problems (only accepting gift trades), but lately I got weird problem, session expiring 1 second after new trade my console logs: [18:35:09] - Processing trade 3459285622 [18:35:10] Session expired - relogging [21:56:28] - Processing trade 3459471951 [21:56:29] Session expired - relogging how I handle it in my bot: const community = new SteamCommunity(); const manager = new SteamTradeofferManager({ steam: client, language: 'en', community }); community.on('sessionExpired', () => { console.log(`[${new Date().toLocaleTimeString()}] Session expired - relogging`); client.webLogOn(); });everything works good, but sometimes getting this error and my bot stuck (should I remove community from manager?) edit: I noticed I wrongly used community in const manager
-
Question Error: Not Logged In (webLogOn() doesn't work)
roughnecks posted a topic in node-steamcommunity
//Logging ON client.logOn(logOnOptions); client.on('loggedOn', function (details) { if (details.eresult == SteamUser.EResult.OK) { client.getPersonas([client.steamID], function (personas) { console.log("== Logged in =============") console.log('== Name: ' + personas[client.steamID]["player_name"]); console.log('== ID64: ' + client.steamID); console.log("=========================="); console.log(""); }); client.setPersona(5); //"5": "LookingToTrade" -- https://github.com/DoctorMcKay/node-steam-user/blob/master/enums/EPersonaState.js client.gamesPlayed('Accepting Junk and Making Friends'); } else { console.log(details); //Do whatever u want to handle the error... } }); client.on('webSession', (sessionid, cookies) => { manager.setCookies(cookies); community.setCookies(cookies); }); As soon as the bot starts everythings works fine. After some minutes, every time an offer is received by the bot, I get the "Not Logged In" error. I set up a cron (after reading a similar thread on this forum), like this: //Session refresh every 15 minutes cron.schedule('*/15 * * * *', () => { if (client.steamID) { client.webLogOn(); } else { client.logOn(logOnOptions); console.log('Logged in again using cron'); } }); but the "not logged in" error still remains. I also read this topic where Admin says this but at this point I don't understand which session needs to be refreshed and how. Also calling "sessionExpired" isn't helping because whenever an incoming trade offer gives me the error, bot doesn't try anymore to accept it, even after session is refreshed, so I have to restart it. manager.on('newOffer', offer => { if (offer.partner.getSteamID64() === 'my_stemid_64') { offer.accept((err, status) => { if (err) { console.log(err); } else { console.log(`Accepted offer from owner. Status: ${status}.`); } }); } else { if (offer.itemsToGive.length === 0) { offer.accept((err, status) => { if (err) { console.log(err); } else { console.log(`Donation accepted. Status: ${status}.`); } }); } else { offer.decline(err => { if (err) { console.log(err); } else { console.log('Donation declined (wanted our items).'); } }); } } }); Any help would be appreciated. -
my bot is getting web session expired and i use community.on('sessionExpired', function(err) { if (err) { console.log('sessionExpired: '+err); } if (client.steamID) { client.webLogOn(); } else { client.logOn(logon_details); } });this code is triggered when the user of bot tried to make the bot start a trade offer. what is a simple way for me to trigger session expired like every 15 mins if the session has expired? Ans- A simple http request every 15 mins using node-cron to trigger it. (i am not a coder so if u could show it to me thanks!) Right now the user of bot triggers it then has to wait 1-2 mins then the bot webLogon() and then sends trade offer Alternative 2 it was suggested in forum we can use direct cronschedule that does webLogOn() every 15 min , and whenever that error fires I also do a webLogOn(). but idk what will happen if i try to webLogON() if the session hasnt been expired yet thats y i wanted to set up Alternative 1
-
Sorry to bother anyone on Christmas but I'm trying to send comments to user profiles. community.postUserComment("steam id", "hello", function (err) { console.log(err); }); But it keeps returning the error: Error: The settings on this account do not allow you to add comments. I've tried this on multiple accounts all of which have comments enabled, even tried on my own (bots) profile, still no luck. Any help would be greatly appreciated!
-
But steam-user inviteToGroup works fine. Though earlier inviteUserToGroup worked as it should.Can you tell me why ?
-
i'm getting the callback is not a function in the steamcommunity/user.js:484 file I have no idea what line of code of mine is causing this, I am trying to make a level bot and get all the sets in our inventory and add as many sets until the amount is reached which is the buyRate * how many keys the user wants to use. error D:\Documents\Google Drive\Node\SteamBot\node_modules\steamcommunity\components\users.js:484 callback(null, inventory, currency, body.total_inventory_count); ^ TypeError: callback is not a function at SteamCommunity.<anonymous> (D:\Documents\Google Drive\Node\SteamBot\node_modules\steamcommunity\components\users.js:484:5) at Request._callback (D:\Documents\Google Drive\Node\SteamBot\node_modules\steamcommunity\components\http.js:67:15) at Request.self.callback (D:\Documents\Google Drive\Node\SteamBot\node_modules\request\request.js:185:22) at Request.emit (events.js:182:13) at Request.<anonymous> (D:\Documents\Google Drive\Node\SteamBot\node_modules\request\request.js:1161:10) at Request.emit (events.js:182:13) at IncomingMessage.<anonymous> (D:\Documents\Google Drive\Node\SteamBot\node_modules\request\request.js:1083:12) at Object.onceWrapper (events.js:273:13) at IncomingMessage.emit (events.js:187:15) at endReadableNT (_stream_readable.js:1086:12) and here is the code that is possibly causing the error ( I am also using https://www.npmjs.com/package/steam-market-search for the market search as I couldn't get the one in steamcommunity to work) for(var i = 0; i < cardApps.length; ++i){ //Loop through all the appid's we have steamMarket.searchCommunity(cardApps[i]).then(function(item){ //searches steam market for the appid var itemCount = 0; var cards = []; for(var j = 0; j < item.length; ++j){ //loop through each item if(item[j].type.includes('Trading Card') && item[j].rarity.includes('Normal')){ //if they are a normal trading card ++itemCount; var ata = 0; if(ata <= cardApps[i].amountToAdd){ for (let y = 0; y < myItems.length; ++y) { //loop through all our items if(myItems[y].market_hash_name == myItems[j].hash_name){ //if our item matches the one we are currently looking at cards.push({id: myItems[y].id, appid: 753, contextid: 6}); // add to item array ++ata; } } } } if(cards.length == itemCount){ offer.addMyItems(cards); cardApps.splice(i, 1); } } }, console.error); }
-
help i can accept the offer in web but can't accept it with node-steamcommunity in some reason our country block the steamcommunity.com when we visit the site our targetlink will be reset,so if we want visit steamcommunity.com we must use a vpn and one day some one find the way to visit it without vpn it's called Reverse Proxy, i thought.(sry for my bad english) The question is now i can visit steamcommunity.com with web and steamclient, but i can't visit is by node-steamcommunity the first offer worked becacuse i use a another ipaddress in hosts, and then i change the hosts to my Reverse Proxy server, and then show Unable to accept offer: self signed certificate what should i do ? can you give me some suggestions? I am very grateful to you for reading these. thanks
-
is there any method to find group by ID64? I know how to grab groupID64, for example: https://steamcommunity.com/groups/multiplay/memberslistxml/?xml=1 but if somebody change URL, how can I find group with only ID64?
-
Hello, I want to make a website about my group member statistics (like Steam Level, Games, etc) using React After i installing node-steamcommunity and i want to trying the module, i got an error 44 | } // Report stats hourly, and immediately in 10 minutes 45 | 46 | 47 | setInterval(reportStats, 1000 * 60 * 60).unref(); 48 | setTimeout(reportStats, 1000 * 60 * 10).unref(); 49 | 50 | if (isDebugging()) { setupReportingD:/testing/node_modules/@doctormckay/stats-reporter/index.js:47 Did I make a mistake?Thank you
-
Please add this option it's new. https://steamcommunity.com/my/edit/settings
-
client.on('wallet', function(hasWallet, currency, balance) { if (balance >= 0) { let playThis = CONFIG.PLAYGAMES; playThis = playThis.toString().replace(/replacebalance/,"游戏代购 ¥:" + balance); console.log("### This bot have Wallet Balance: " + balance) wallet = balance; } }); client.on("friendMessage", function(steamID, message) { if (message == "!check") { client.chatMessage(steamID, "我账号上面还有:¥" + wallet); }; }); hello every one i user this code can check my bot wallet, is there any possible i can get how many csgokeys my robot has?
-
Hey there! Is it possible by creating a custom POST request, node-steamcommunity will supply me with the needed cookies? Should I use postman to see what's needed? Besides from that, I need to know where I should request it, what about a RESTful API of some sort? If someone would help me with all this it would be amazing, I'm at a dead end. Thanks!
-
I'm attempting to get a bot working from the tutorial located at https://github.com/andrewda/node-steam-guide, but I seem to have run into a problem. I've been trying for several hours to get the bot to recognize the "steamcommunity" module on chapter 2.2, but nothing I've tried has worked. I've tried everything from redownloading the associated module to a full reinstall of everything related to the bot. Any help would greatly be appreciated. The error I get upon attempting to debug using my editor Copied directly from my editor, I narrowed the issue down to line 3 in a previous test, but haven't been able to figure it out. The first screenshot shows the admin console with the command I used to download the module as well as the node_modules and steamcommunity folders. The second screenshot shows the output of the node.js window.
-
"uri": "https://steamcommunity.com/comment/Profile/post/" + userID.toString() + "/-1", "form": { "comment": message, "count": 6, "sessionid": this.getSessionID() }, What's -1 in the end of the URI and what's "count" param?
-
community.getGroupHistory(gid,page, (err,history)=>{ if(!err){ console.log(history); } else { console.error(err); } }); I wrote this code but you do not have the permissions to access this group attribute to me. showed error. gid = "103582791462876010";
-
- node.js
- node-steamcommunity
-
(and 2 more)
Tagged with:
-
Hello guys, I want to create steam market bot and now I have a problem with selling items function. community.httpRequestPost('https://steamcommunity.com/market/sellitem/',options, (err, response, json) => { if(err) { console.log(err.toString()); return; } console.log(json); }, "steamcommunity"); This is how i run it. var options = { url: 'https://steamcommunity.com/market/sellitem/', headers: { 'Origin': 'https://steamcommunity.com', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36', 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'Referer': 'https://steamcommunity.com/my/inventory/', 'Accept-Encoding': 'gzip, deflate', 'Accept-Language': 'ru,en-US;q=0.8,en;q=0.6,en-AU;q=0.4' }, form: { sessionid: community.getSessionID(), appid: 218620, contextid: 2, assetid: 1893071216426009763, amount: 1, price: 2000, } }; And the options (Payday2 crate). The error I get: {"success":false,"message":"There was a problem listing your item. Refresh the page and try again."} I can not understand where the problem is, wanna know your opinion about it. Thank you, Anton
-
Question Error ReferenceError: community is not defined
RedyyPT posted a topic in node-steamcommunity
community.postUserComment(steam, ':metallove: sɪɢɴᴇᴅ ʙʏ ʀᴇᴅᴅʏ sɪɢɴᴇᴅ ʙʏ ʀᴇᴅᴅʏ , ғᴜɴᴅᴀᴅᴏʀ ᴅᴀ ᴄᴏᴍᴜɴɪᴅᴀᴅᴇ ᴄʜᴇᴀᴅᴄᴏᴍᴍᴜɴɪᴛʏ :metallove:') ^ ReferenceError: community is not defined at SteamUser.<anonymous> (/root/bot/bot.js:275:9) at SteamUser.emit (events.js:187:15) at SteamUser._emitIdEvent (/root/bot/node_modules/steam-user/components/utility.js:29:12) at SteamUser._handlers.(anonymous function) (/root/bot/node_modules/steam-user/components/chat.js:281:9) at SteamUser._handleMessage (/root/bot/node_modules/steam-user/components/messages.js:249:30) at CMClient.emit (events.js:182:13) at CMClient._netMsgReceived (/root/bot/node_modules/steam-client/lib/cm_client.js:323:8) at CMClient.handlers.(anonymous function) (/root/bot/node_modules/steam-client/lib/cm_client.js:603:8) at CMClient._netMsgReceived (/root/bot/node_modules/steam-client/lib/cm_client.js:305:24) at TCPConnection.emit (events.js:182:13) config bot: client.on("friendMessage", function(steam, message) { if (message == "!assinar") { client.chatMessage(steam, "O Teu perfil agora está assinado por mim. Aproveita") community.postUserComment(steam, ':metallove: sɪɢɴᴇᴅ ʙʏ ʀᴇᴅᴅʏ , ғᴜɴᴅᴀᴅᴏʀ ᴅᴀ ᴄᴏᴍᴜɴɪᴅᴀᴅᴇ ᴄʜᴇᴀᴅᴄᴏᴍᴍᴜɴɪᴛʏ :metallove:')}}) -
Okay, forgive me, but I am a bit confused about this. I've tried looking for better examples or documentation, but it didn't clear things up for me. I have a few questions: Is the id property of a gift object (e.g. an item from gifts from the gifts event) the same as an assetid of an CEconItem? You seem to use these terms interchangeably in your documentation, but I am not sure. Without knowing the answer of the first question, can/should you use community.redeemGift with the gift.id as first parameter? Let say I am doing the thing question 2 is asking about, in the gifts event. Why is it that after sending a trade offer where I'd receive a steam gift, not automatically redeem a steam gift when offer is accepted? * What should I do for the scenario mentioned in question 3, or if I receive a trade offer with 1 or more steam gifts, which I accept (using trade offer manager)? ** I realized that the gifts event is only for when gifts are sent directly to me, and not via trade offers (as they get sent to inventory). So, in case of trade offers, after accepting a trade with trade offer manager, I should use offer.getReceivedItems to check if they contain steam gifts and redeem them? How do I do that exactly? I assume I check for some property of CEconItem item of the received items to see if it's a steam gift and then use community.redeemGift(item.assetid, ...)? But which property and what value? ** ** Found out I should check for property type (https://github.com/DoctorMcKay/node-steamcommunity/wiki/CEconItem#type) with value Gift. Should I only call offer.getReceivedItems after trade offer has been accepted AND confirmed? Or can you do it also for unconfirmed accepted?
-
Hey, is there a way to send comments to workshop items and guides?
-
Hello, I have a few accounts linked to manager, and I noticed oAuth logins expiring after 1 year after add, and now these accounts which I added 1 year ago, giving me HTTP 401 errors, I need to relog again with steam guard code and it works again. is there any chance to prevent expiring oAuth logins after 1 year?
-
Hello I can't find, is possible to buy game as gift for friend?
-
Hello! I'm developing a bot, one function of which is posting EmoticomArt in User profile: https://steamcommunity.com/id/7Pony/ You can see examples in the comments section. I ran into a problem that I myself can not solve: Comments posted by a bot are always long. Plus, there should be some stock, designed for additional text. // USER - receiver; POSTCARD - EmoticonArt; SPLITMESSAGE - optional, comments or any other text USER.comment(POSTCARD + " \n " + SPLITMESSAGE, (ERR) => { if (ERR) { console.log("fail: " + ERR); } else { console.log("done!"); } }); Everything would be fairly easy if the limit was always equal 1000 symbols.Bot can post: //989: Postcard=":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::" //1000: "aAaAaAaAaAaAa…" etc.But try to Post comment with emoticons: //660, result = done! Postcard":rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg:" //668, result = error Postcard+":rg::rg:" //or 668, error Postcard+"aAaAaAaAa" //More examples: // ~850, OK: ":greentwist::greentwist::spikeball::spikeball::spikeball::spikeball::spikeball::greentwist::greentwist: \n :greentwist::spikeball::Hackingart::Hackingart::spikeball::Hackingart::Hackingart::spikeball::greentwist: \n :spikeball::Hackingart::Hackingart::Hackingart::Hackingart::Hackingart::Hackingart::Hackingart::spikeball: \n :spikeball::Hackingart::Hackingart::Hackingart::Hackingart::Hackingart::Hackingart::Hackingart::spikeball: \n :spikeball::spikeball::Hackingart::Hackingart::Hackingart::Hackingart::Hackingart::spikeball::spikeball: \n :spikeball::spikeball::spikeball::Hackingart::Hackingart::Hackingart::spikeball::spikeball::spikeball: \n :greentwist::spikeball::spikeball::spikeball::Hackingart::spikeball::spikeball::spikeball::greentwist: \n :greentwist::greentwist::spikeball::spikeball::spikeball::spikeball::spikeball::greentwist::greentwist:" // ~760, Eroor": ":mundodanger::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::mundodanger: \n :rg::wbox::SNF4::SNF4::SNF4::SNF4::SNF4::wbox::SNF4::SNF4::SNF4::SNF4::SNF4::wbox: \n :rg::SNF4::wbox::SNF4::SNF2::SNF5::SNF4::wbox::SNF4::SNF1::SNF4::SNF4::wbox::SNF4: \n :rg::wbox::SNF4::wbox::SNF4::SNF4::SNF4::wbox::SNF4::SNF4::SNF4::wbox::SNF4::wbox: \n :rg::wbox::SNF2::wbox::SNF4::SNF4::wbox::wbox::wbox::SNF4::SNF4::wbox::SNF1::wbox: \n :rg::wbox::SNF4::wbox::SNF4::SNF2::SNF4::wbox::SNF4::SNF1::SNF4::wbox::SNF4::wbox: \n :rg::SNF4::wbox::SNF4::SNF4::SNF4::SNF4::wbox::SNF4::SNF4::SNF4::SNF4::wbox::SNF4: \n :rg::wbox::SNF4::SNF4::SNF2::SNF4::SNF4::wbox::SNF4::SNF4::SNF4::SNF1::SNF4::wbox: \n :mundodanger::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::rg::mundodanger:"Thus, the length of the comment with emoticons can be from 660 to ~900-1000 symbols.I also thought that there is a limit to emoticons, but here I did not find any logic.
-
I cant load my personal user by this method.What im doing wrong? community.getSteamUser('76561198114587613', function(err, user) { if (err) { console.log(err); } else { console.log(user); } });