Jump to content
McKay Development

All Activity

This stream auto-updates

  1. Yesterday
  2. Pretty much anything is possible when Steam is involved. You should be prepared to handle an eventuality where an offer send fails but it ends up going through and being accepted. You can use the unknownOfferSent event to detect when an offer goes through that isn't expected to (i.e. you called offer.send and it succeeded).
  3. Good afternoon again, Doctor. Can you please tell me if steam can give an error when offer.send but still send the trade? (because steam is shit) this.sentOffer = this.manager.createOffer( new TradeOfferManager.SteamID(this.withdraw.steamUser.steamId), this.withdraw.tradeToken.token, ); this.sentOffer.addMyItem({ assetid: this.withdraw.botItem.assetId, appid: this.withdraw.botItem.item.gameId, contextid: 2, }); return new Promise((resolve, reject) => { this.sentOffer.send(async (tradeError, status) => { if (tradeError) { if (this.sentOffer) { this.sentOffer.cancel(); } return reject(tradeError); } if (status === "pending") { telegramBotCreateOffer(this.bot, JSON.stringify(this.sentOffer)); this.community.acceptConfirmationForObject( this.bot.identitySecret, this.sentOffer.id, async err => { if (err) { this.sentOffer.cancel(); await error(err); } }, ); return resolve(); } // here i have to cancel the trade? return reject(); }); });
  4. Can any one help me? I have a bot who can accept and send any offers to any steam user (term & condition apply). but the problem is , I want, when user login into our platform we fetch user inventory using steam api, I want user send offer to user bot using our platform. please help, how can I implement these flow or suggest better flow,
  5. Last week
  6. You need to call setCookies on the TradeOfferManager instance. Passing a SteamCommunity to the TradeOfferManager constructor makes TradeOfferManager call setCookies on the SteamCommunity instance when you call setCookies on the manager instance, but not the other way around.
  7. Good afternoon Dr McKay. I'm trying to get data after the created trade object, and I get an error My Code: const SteamTotp = require("steam-totp"); const Community = require("steamcommunity"); const TradeOfferManager = require("steam-tradeoffer-manager"); const community = new Community(); const manager = new TradeOfferManager({ community, }); const accountName = "anonymos for forum"; const accountPassword = "anonymos for forum"; const accountSharedSecret = "anonymos for forum"; const accountIdentitySecret = "anonymos for forum"; const createSession = async () => { return new Promise((resolve, reject) => { community.login( { accountName, password: accountPassword, twoFactorCode: SteamTotp.generateAuthCode(accountSharedSecret), }, async (err, sessionId, cookies, steamGuard, oAuthToken) => { if (err) { console.log(err); return resolve(null); } community.setCookies(cookies); console.log("Auth!"); return resolve(true); }, ); }); }; const checkSession = async () => { return new Promise(resolve => { community.loggedIn(async (err, loggedIn, familyView) => { if (err) { console.log("CheckSession", err); } console.log({ loggedIn, familyView }); return resolve(); }); }); }; const sendTrade = async () => { await createSession(); await checkSession(); let offer = null; const create = async () => { return new Promise(resolve => { offer = manager.createOffer(new TradeOfferManager.SteamID("anonymos for forum")); offer.setToken("anonymos for forum"); offer.addMyItem({ assetid: "anonymos for forum", appid: "252490", contextid: 2, }); console.log("Trade Created"); return resolve(); }); }; await create(); await new Promise(resolve => setTimeout(() => resolve(), 5000)); offer.getUserDetails((err, me, them) => { if (err) { console.log(err); } else { console.log({ me, them }); } }); }; sendTrade(); Error console: Auth! { loggedIn: true, familyView: false } Trade Created /app/node_modules/steam-tradeoffer-manager/lib/classes/TradeOffer.js:811 var myAvatar = body.match(new RegExp('<img src="([^"]+)"( alt="[^"]*")? data-miniprofile="' + this.manager.steamID.accountid + '">')); ^ TypeError: Cannot read property 'accountid' of null at SteamCommunity.<anonymous> (/app/node_modules/steam-tradeoffer-manager/lib/classes/TradeOffer.js:811:118) at Request._callback (/app/node_modules/steamcommunity/components/http.js:67:15) at Request.self.callback (/app/node_modules/request/request.js:185:22) at Request.emit (events.js:314:20) at Request.<anonymous> (/app/node_modules/request/request.js:1154:10) at Request.emit (events.js:314:20) at Gunzip.<anonymous> (/app/node_modules/request/request.js:1076:12) at Object.onceWrapper (events.js:420:28) at Gunzip.emit (events.js:326:22) at endReadableNT (_stream_readable.js:1241:12) [nodemon] app crashed - waiting for file changes before starting...
  8. My problem is when i send any offer from the steam official site it worked, but I want to create a site like skin port, I created a bot who accept any offer and receive any offer. I want any user who are register on my platform they can send trade offer to our bot with using our native platform like skin port https://skinport.com/
  9. Sorry, I don't have time to help with stuff like this.
  10. Thank you for replying to me, but I don't know much about JS code. So I hope to get your help, which will pay a certain fee.
  11. You're logging in to an anonymous user account (that's what the a means in [a:1:x]), which implies that your accountName is undefined.
  12. https://github.com/DoctorMcKay/node-steam-user/blob/master/components/cdn.js#L268
  13. Hey there, hope someone that used this can help me understand this login system better. What i need: A webSession How i get that: webSession Event emiter I want to use this remember token (loginKey from the event) aswell as storing the password plain text (I know stupid) as optional parameter. Application should be able to run a long time. My problem is, that i do not get a webSession even all the time, as said in docs "NOTE: If you log on this way, webSession will NOT be emitted automatically, and you will need to use webLogOn() to get a web session." but here my problem starts, i don´t know how to use webLogOn(), IDE tells me i need nothing, i tryed the client, and steamID objects. Both didn´t work. The other thing is, i wrote some logic to handle logins and to store username + password (optional) in a config file. However it sometimes just logs me in. Without using that config file. Even when i used "rememberPassword: false". Here the code: /** * Login into steam as normal steam client * @param {Json} [config] */ const Steam_login = (config = global_config) => { if (fs.existsSync('./loginkey')) { log.info("Login with loginkey") client.logOn({ accountName: config.Steam_Username, loginKey: fs.readFileSync('loginkey', 'utf8'), }) } else { if (config.Steam_Password !== "") { log.info("Login with username & password") client.logOn({ "accountName": config.Steam_Username, "password": config.Steam_Password, rememberPassword: false }); } else { log.error("Login with loginKey failed and no password was found. EXIT") process.exit(1) } } } This logs me in without loginkey on my FS AND without the password stored, i don´t get how or why. I´ve pushed the full code here ( https://github.com/BolverBlitz/BulkSteamKeyQueueActivator ) currently it doesn´t anything but logging in. This is my output and config file. I don´t know why it logs in s Any help or enlightenment would be nice, or a nudge to the docs to clear this up for me. I´m sorry if i just overlooked something...
  14. Earlier
  15. Hello! I have developed a tool similar to "node steam user", and 401 will appear when downloading games. I see in the code that I need to get "requestcode", and I can't understand the rest. I can ask you to explain how to get "requestcode" for me. Or let you help me make a tool to get "requestcode". Telegram: https://t.me/in_join
  16. https://github.com/DoctorMcKay/node-globaloffensive/blob/master/index.js#L277-L290 This code will probably work.
  17. Hello, I am trying to send a message to the TF2 game coordinator to rename an item. I tried adding the following code TeamFortress2.prototype.nameItem = function(tagID, itemID, name) { let buffer = new ByteBuffer(16 + Buffer.byteLength(name) + 1, ByteBuffer.LITTLE_ENDIAN); buffer.writeUint64(tagID); buffer.writeUint64(itemID); buffer.writeUTF8String(name); this._send(Language.NameItem, null, buffer); } Nothing happens after I provide the item IDs and a custom name, however. I do not know how I should be constructing the bytebuffer, and it's hard to tell what I'm doing wrong since there doesn't seem to be any response from the GC at all. I would appreciate any help.
  18. Well i dont know, i will try something and see what happens. It's really sad that steam does this thing.
  19. You could just keep the offer object in memory somewhere and call getExchangeDetails on it again later. Or look it up by trade offer ID. TradeOfferManager doesn't have any way to request the trade status API without having a TradeOffer object first.
  20. I've done that. They will never show up unless another offer isnt accepted. One that i receive items from. I can debug that with like if(state == "missingItems") debug[uniqueid] = 1; And then when somebody trades, i get the items by the previous offer. I just dont know how to get the items by already finished offer in the code. Do i need to store tradeid in the table as well or.. im not quite sure.
  21. I bet that for some reason, immediately after the trade finishes it's not returning the items but after some time they show up. I'd recommend that you set up retries for getExchangeDetails if it comes back empty.
  22. {"response":{"trades":[{"tradeid":"4120244556543802635","steamid_other":"76561198245675394","time_init":1654976854,"status":3,"assets_given":[{"appid":252490,"contextid":"2","assetid":"3740816287932622872","amount":"1","classid":"3631599957","instanceid":"0","new_assetid":"3729557288863109072","new_contextid":"2"},{"appid":252490,"contextid":"2","assetid":"3740816287932622877","amount":"1","classid":"4481862621","instanceid":"0","new_assetid":"3729557288863109073","new_contextid":"2"}]}]}} Yep The items are in the inventory they are just hidden for some reason. I once did console.log(receivedItems) and i got empty array []. After sending another offer, the items were shown.
  23. Check the same trade ID using the other bot's API key and see if it properly reports assets_received.
  24. I'm using 2 bots. One as a storage and one as a trading bot. When somebody requests a withdraw, trading bot gets the items by the store bot, when offer is Accepted, the trading bot sends an offer to the user with the items. The problem is offer is accepted but the trading bot is empty. I have to debug it as i said above. Im storing the assetids into database table with states of the offer and unique id, the problem is that row "new_assets" was empty. I don't know what to do at that situation. May i somehow get the items by that bugged offer after a new offer is accepted and the items show up? Like getItemsByOffer(offerid) or some other parameter, i don't know.
  25. Looks like it's returning assets_given, but not assets_received, so that would be why receivedItems is empty in TradeOfferManager. That's the data that Steam is reporting.
  26. Hello and thanks for your help. I checked the offer by trade_id. It's not empty. {"response":{"trades":[{"tradeid":"4120244556543804085","steamid_other":"76561198235183636","time_init":1654976889,"status":3,"assets_given":[{"appid":252490,"contextid":"2","assetid":"3729557288863109072","amount":"1","classid":"3631599957","instanceid":"0","new_assetid":"3740816287932624686","new_contextid":"2"},{"appid":252490,"contextid":"2","assetid":"3729557288863109073","amount":"1","classid":"4481862621","instanceid":"0","new_assetid":"3740816287932624689","new_contextid":"2"}]}]}} It's weird that this thing is happening on player to player trade, without any bots and codes. It only happens for rust, as far as i noticed myself. I was wondering to get some "debug" items and make a tradeoffer whenever "missing items" error occurs while trying to send an offer with the requested items. Because they are in the inventory, but they are hidden till a new item pops up.
  1. Load more activity
  • Create New...