Jump to content
McKay Development

Search the Community

Showing results for tags 'steamcommunity'.

  • 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

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 8 results

  1. I'm trying to post a comment on my group (https://steamcommunity.com/groups/testingwall) but it's not working for some weird reason. const content = "hello world"; const gid = config.clanid; community.postGroupComment(gid, content); This is the "clanid" in my config: { [..] "clanid": "103582791470169702" } This is the error I'm getting when I run the program [..]\Bot\node_modules\steamcommunity\components\groups.js:611 "uri": "https://steamcommunity.com/comment/Clan/post/" + gid.getSteamID64() + "/-1/", ^ TypeError: Cannot read property 'getSteamID64' of undefined at SteamCommunity.postGroupComment ([..]\Bot\node_modules\←[4msteamcommunity←[24m\components\groups.js:611:64) Please help me!
  2. The is my steam bot code. Idk what is wrong to code bot it don't work very good because after 1-2 days it brakes. That are the errors that i get: Error: Disconnected at SteamClient._disconnected (/var/server/node_modules/steam/lib/steam_client.js:189:24) at Connection.emit (events.js:189:13) at TCP._handle.close (net.js:600:12) TypeError: Cannot read property 'send' of undefined at SteamClient._send (/var/server/node_modules/steam/lib/steam_client.js:117:20) at SteamClient.send (/var/server/node_modules/steam/lib/steam_client.js:126:8) at SteamUser.requestWebAPIAuthenticateUserNonce (/var/server/node_modules/steam/lib/handlers/user/index.js:37:16) at SteamWebLogOn.<anonymous> (/var/server/node_modules/steam-weblogon/index.js:34:23) at ClientRequest.<anonymous> (/var/server/node_modules/steam-web-api/index.js:34:9) at Object.onceWrapper (events.js:277:13) at ClientRequest.emit (events.js:189:13) at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:556:21) at HTTPParser.parserOnHeadersComplete (_http_common.js:109:17) at TLSSocket.socketOnData (_http_client.js:442:20) at TLSSocket.emit (events.js:189:13) at addChunk (_stream_readable.js:284:12) at readableAddChunk (_stream_readable.js:265:11) at TLSSocket.Readable.push (_stream_readable.js:220:10) at TLSWrap.onStreamRead [as onread] (internal/stream_base_commons.js:94:17) And more errors. I want the best code the this bot without disconnects and with auto session cookies set after expires. Thanks. BOT CODE var bots = { steam: { botname: config.bot_steam.botname, username: config.bot_steam.username, password: config.bot_steam.password, identitySecret: config.bot_steam.identitySecret, sharedSecret: config.bot_steam.sharedSecret } } var new_steam_bot = function() { var connected = false; var community = new SteamCommunity(); var client = new Steam.SteamClient(); var user = new Steam.SteamUser(client); var friends = new Steam.SteamFriends(client); var webLogon = new SteamWebLogon(client, user); var manager = new TradeOfferManager({ steam: client, community: community, domain: 'localhost', language: 'en', cancelTime: 150000 }); client.connect(); return { connected, community, client, user, friends, webLogon, manager, } } var Steam = require('steam'); var TradeOfferManager = require('steam-tradeoffer-manager'); var SteamTotp = require('steam-totp'); var SteamWebLogon = require('steam-weblogon'); var SteamCommunity = require('steamcommunity'); var q = require('q'); var protos = require('./protos'); var steam_bots = new_steam_bot(); steam_bots.client.on('connected', function() { logger.warn('[BOT] Client Connected'); steam_bots.user.logOn({ account_name: bots.steam.username, password: bots.steam.password, two_factor_code: SteamTotp.generateAuthCode(bots.steam.sharedSecret) }); }); steam_bots.client.on('logOnResponse', function(response) { if(response.eresult !== Steam.EResult.OK) { logger.warn('[BOT] Client Login Failed'); steam_bots.client.connect(); return; } logger.warn('[BOT] Client Login Success'); setWebLogOn(); }); steam_bots.client.on('loggedOff', function(eresult, msg) { logger.warn('[BOT] Client Logout. Message: ' + msg); steam_bots.client.connect(); }); steam_bots.client.on('error', function(err) { logger.warn('[BOT] Client Error. Error: ' + err.message); logger.error(err); writeError(err); if(err.message == 'Disconnected') { logger.error('[BOT] Client Disconnected. Reconnecting!'); steam_bots.client.connect(); } }); steam_bots.community.on('confKeyNeeded', function(deepDataAndEvents, updateFunc) { logger.warn('[BOT] Need Conf Key'); updateFunc(null, time, SteamTotp.getConfirmationKey(bots.steam.identitySecret, time(), deepDataAndEvents)); }); steam_bots.community.on('sessionExpired', function(err) { logger.warn('[BOT] Session expired, logging in...'); bots.steam.connected = false; steam_bots.community.stopConfirmationChecker(); setWebLogOn(); }); steam_bots.user.on('updateMachineAuth', function( sentry, callback ) { callback({ sha_file: getSHA1(sentry.bytes) }); }); function getSHA1(bytes) { var shasum = crypto.createHash('sha1'); shasum.end(bytes); return shasum.read(); } function setWebLogOn(){ try{ steam_bots.webLogon.webLogOn(function(sessionID, cookies) { logger.warn('[BOT] Session cookies set'); steam_bots.manager.setCookies(cookies, function(err) { if (err) { logger.error(err); writeError(err); process.exit(1); } }); steam_bots.community.setCookies(cookies); steam_bots.community.startConfirmationChecker(5000, bots.steam.identitySecret); setTimeout(function(){ steam_bots.connected = true; loadOffersSent(); loadPricesAll(); }, 1000); }); } catch(err){ logger.warn('[BOT] Error Web Log On. Error: ' + err.message); logger.error(err); if(client.loggedOn){ user.requestWebAPIAuthenticateUserNonce(function(result){ logger.error('Error: Request Web API Authenticate User Nonce. ' + result); }); } else { client.connect(); } } }
  3. Hello, I keep getting a bad request error (400) when I try to post with this function. All the info I have in the function should be correct. Any ideas? community.httpRequestPost("https://steamcommunity.com/market/sellitem/", { data: { 'sessionid': sessionID, 'appid': 730, 'contextid': 2, 'assetid': 18534283110, 'amount': 1, 'price': 1 } }, function(err) { if (err) throw err; }); It gets the sessionID variable from logging in, so that shouldn't be an issue.
  4. Hello i have authorized node js bot and Steam Web API of my 2nd account, i'm looking for the way to send trade offers to this 2nd account without it's token is there any possible way to do this? I was thinking about sending friend request first and tried this POST request to Steam Web Api but it's seem not working https://api.steampowered.com/IPlayerService/AddFriend/v1/?key=2ND_ACC_API&steamid=BOT_ID
  5. const SteamUser = require('steam-user');const SteamTotp = require('steam-totp');const SteamCommunity = require('steamcommunity');const TradeOfferManager = require('steam-tradeoffer-manager'); const client = new SteamUser();const community = new SteamCommunity();const manager = new TradeOfferManager({ steam: client, community: community, language: 'en'}); const logInOptions = { accountName: "........", password: "...........", twoFactorCode: SteamTotp.generateAuthCode("............")}; client.logOn(logInOptions); client.on('loggedOn', () => { console.log('logged on');client.setPersona(SteamUser.EPersonaState.Online, "bot1");client.gamesPlayed(570);});client.on('webSession', (sid, cookies) => {console.log(cookies); manager.setCookies(cookies); community.setCookies(cookies); community.startConfirmationChecker(10000, "............"); mytrade();}); manager.on('newOffer', offer => { console.log('offer detected'); if (offer.partner.getSteamID64() === '.............') { offer.accept((err, status) => { if (err) { console.log(err); } else { console.log(status); } }) } else { console.log('unknown sender'); offer.decline(err => { if (err) { console.log(err); } else { console.log('trade from stranger declined'); } }); }}); function mytrade() {manager.getOfferToken((err, token) => {if (err) {console.log("gsfgfasy", err)}else {var partner="id........"const offer = manager.createOffer('id.....',token);manager.getUserInventoryContents(partner,570, 2, true, (err, myInv) => {if (err) {console.log(err);} else {console.log("myenv",myInv[0]);// myInv.forEach(function(item) {offer.addTheirItem(myInv[0]);offer.setMessage('You received a floral shirt!');offer.send((err, status) => {if (err) {console.log(err);} else {console.log('trade sent');console.log(status);}}) // })}}) }})}
  6. Is there a module to confirm sell orders on mobile, I have over 25k+ items that I want to sell and I haven't found a module to confirm mobile orders.
  7. So, I don't know if this is the right section for this thread, but it is tied to steamcommunity... Basically, I'm not using node-steamcommunity because I almost completely developed my app (a Chrome extension) before discovering that it existed. Also I didn't use Node.js... I'm here to ask you if you know of any way to check if a user's session has expired without calling, for example, the user's profile page and checking if you get redirected to the login page. This is how I'm doing it right now but Google doesn't like it because it thinks I'm loading scripts from an external resource (since the call returns HTML). All the steamcommunity.com endpoints I found just return error 400 if the session has expired, which isn't reliable enough. I beg for your help >_> thank you. edit: Welp, Google accepted my code... I don't need this anymore...
  8. How to use it in this new version ? So to draw the best image of the object from the market. Something all the time with me it does not work and does not want to exchange contact me id objects or images.
×
×
  • Create New...