-
Posts
82 -
Joined
-
Last visited
Everything posted by TheMaster
-
i have now resolved issue to listening received offerchange event when a n offer changes to accepted and is a gift then it extracts the id and send it to db is this approach ok?
-
they are one way trades like when u get trades from p2p market places i have read the description of the method this applies to two way trades i am asking about 1 way trades or in other words gift trades
-
my problem statement is i want to input the asset ids and the name of items in my database as soon as they are received what is the most fastest and efficient way to do that?
-
I want to map the asset ids of items that some in my inventory by that i mean i have a accept gifts function which accepts gift trades i want to see the new asset id of the item how can i do that without calling additional methods is this possible ?
-
yah thats what i told u noice work
-
I have treated the error on my end I was calling the send offer without checking partner so I fixed it I am suggesting that the error should be handled gracefully as u have written the error message but instead it crashes code Respectfully,
-
brother it is contained in the mafile created by SDA or setting up the account auth using the DR.mckay libraries (never used this way)
-
i am very sorry for the late reply it seemslike the the error was happening when i was calling the sendoffer function with in valid or incomplete details but instead of showing what was the cause it was crashing the program with the above error so i adjusted the main if statement on the new trade offer to if (!this.partner?.isValid || !this.partner?.isValid() || this.partner?.type != SteamID.Type.INDIVIDUAL) { throw new Error("Invalid input SteamID " + this.partner); } in this way we safely access or try to access the contents and dosent crashes the program
-
if have no clue what this error means it started coming suddenly my account is fine E:\Bots\node_modules\steam-tradeoffer-manager\lib\classes\TradeOffer.js:19 if (!this.partner.isValid || !this.partner.isValid() || this.partner.type != SteamID.Type.INDIVIDUAL) { ^ TypeError: Cannot read properties of undefined (reading 'isValid') at new TradeOffer (E:\Bots\node_modules\steam-tradeoffer-manager\lib\classes\TradeOffer.js:19:20) at TradeOfferManager.createOffer (E:\Bots\node_modules\steam-tradeoffer-manager\lib\index.js:506:14) at sendOffer (E:\Bots\Autoconfirmbot\mainimprovements.js:168:25) at WebSocket.incoming (E:\Bots\Autoconfirmbot\modules\shadowpaysell.js:116:17) at WebSocket.emit (node:events:520:28) at Receiver.receiverOnMessage (E:\Bots\node_modules\ws\lib\websocket.js:1209:20) at Receiver.emit (node:events:520:28) at Receiver.dataMessage (E:\Bots\node_modules\ws\lib\receiver.js:594:14) at Receiver.getData (E:\Bots\node_modules\ws\lib\receiver.js:496:10) at Receiver.startLoop (E:\Bots\node_modules\ws\lib\receiver.js:167:16) Node.js v22.1.0
-
can i create a trade offer with only the trade token of a user the website endpoint doesnot provide the steam id 32 or steam id 64 i an looking at this but we are still giving the steam id of user var offer = manager.createOffer(new TradeOfferManager.SteamID("76561198006409530"), "KYworVTM"); // trade token provided
-
mind sharing the code ur statement is too vague
-
@Dr. McKay idk y this error is arising C:\Autoconfirmbot\node_modules\steam-tradeoffer-manager\lib\classes\TradeOffer.js:19 if (!this.partner.isValid || !this.partner.isValid() || this.partner.type != SteamID.Type.INDIVIDUAL) { ^ TypeError: Cannot read properties of undefined (reading 'isValid') at new TradeOffer (C:\Autoconfirmbot\node_modules\steam-tradeoffer-manager\lib\classes\TradeOffer.js:19:20) at TradeOfferManager.createOffer (C:\Autoconfirmbot\node_modules\steam-tradeoffer-manager\lib\index.js:506:14) at sendOffer (C:\Autoconfirmbot\mainimprovements.js:158:25) at Object.sellerforwax (C:\Autoconfirmbot\modules\waxpeer.js:26:11) at SteamUser.<anonymous> (C:\Autoconfirmbot\mainimprovements.js:317:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
-
i do know what an error code 503 means but the main question is how to handle this like to i implement a back off strat or like call log on again how should i handlethi because the script just stops at that point when the 503 comes
-
getting this error idk y this is caused and how to handle this C:\New folder\node_modules\steamcommunity\components\http.js:108 err = new Error("HTTP error " + response.statusCode); ^ Error: HTTP error 503 at SteamCommunity._checkHttpError (C:\New folder\node_modules\steamcommunity\components\http.js:108:9) at Request._callback (C:\New folder\node_modules\steamcommunity\components\http.js:50:61) at self.callback (C:\New folder\node_modules\request\request.js:185:22) at Request.emit (node:events:519:28) at Request.<anonymous> (C:\New folder\node_modules\request\request.js:1154:10) at Request.emit (node:events:519:28) at Gunzip.<anonymous> (C:\New folder\node_modules\request\request.js:1076:12) at Object.onceWrapper (node:events:633:28) at Gunzip.emit (node:events:519:28) at endReadableNT (node:internal/streams/readable:1696:12) { code: 503 } Node.js v21.7.1
-
ummm i have a problem idk y this is happening can anyone diagnose? the below is the only connection logic client.logOn(logOnOptions); client.on('loggedOn', function() { console.log(green,`Logged into Steam ${accname}`); }); setInterval(() => { if (!client.steamID) { client.logOn(logOnOptions); } },600000); // 10 mins 600000 setInterval(() => { if (!client.steamID) { client.logOn(logOnOptions); }else{ client.webLogOn(); } },3600000); // 1 hour 3600000 C:\New folder\node_modules\steam-user\components\09-logon.js:49 let alreadyConnectingError = new Error('Already attempting to log on, cannot log on again'); ^ Error: Already attempting to log on, cannot log on again at SteamUser.logOn (C:\New folder\node_modules\steam-user\components\09-logon.js:49:32) at Timeout._onTimeout (C:\New folder\mainimprovements.js:788:20) at listOnTimeout (node:internal/timers:573:17) at process.processTimers (node:internal/timers:514:7) Node.js v21.7.1
-
well that seems like a bigger problem with your connection logic the session websession even is called when ever ur current websession expires its a automatic process and does not require ur intervention u need to look at ur reconnection or the weblogon etc stuff i think
-
NP, and definitely your choice this function and method automatically updates the access token when ever the websession is established and the plus point is that u dont need to write another function to me its more compact
-
can't get apikey with manager.apiKey
TheMaster replied to venfiw's topic in node-steam-tradeoffer-manager
just use the getwebapi method in other libraries like node steam community async function getWebApiKey() { return new Promise((resolve, reject) => { community.getWebApiKey((err, key) => { if (err) { reject(err); } else { webapi=key console.log(green,"Got API key: " + webapi); resolve(key); } }); }); } -
Expireafter in trade doesn't work
TheMaster replied to Stan1slaw's topic in node-steam-tradeoffer-manager
are u sing this in this in the constructer? -
acutally u can listed to client.on wesbsession as it has the callback cookies u and the steam login secre cookie u can extract the access token from there ill give u the function to do that function extractJWTToken(tokenString) { const jwtRegex = /ey[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_.+/=]+/; const jwtToken = tokenString.match(jwtRegex); return jwtToken ? jwtToken[0] : null; } client.on('webSession', async (sessionID, cookies) => { //console.log(cookies) let jwtToken = extractJWTToken(cookies[0]) //console.log(jwtToken) cookiesformarket=jwtToken manager.setCookies(cookies, function(err) { //console.log(cookies) if (err) { console.log(red,err); process.exit(1); // Fatal error since we couldn't get our API key return; } safePromise(withTimeout(stayOnline(refreshToken, marketapi,cookiesformarket), 10000,"stayOnline")) // Adjust timeout as needed .catch(error => console.error(red,'Error staying online:', error)); // Error handling //webapi=manager.apiKey //fetchActiveTradeOffers(); // Call the function } ); can u testify my answer?
-
Expireafter in trade doesn't work
TheMaster replied to Stan1slaw's topic in node-steam-tradeoffer-manager
hey what procedure do u use to automatically cancel trades after a certain amount of time? -
nice helping people out
-
The manager dosent seems to be working
TheMaster replied to TheMaster's topic in node-steam-tradeoffer-manager
yo man thank u very much u sve me a lot of hassle how u found this tho? but when i use this the webapi is null its not getting the webapi correctly client.on('webSession', async (sessionID, cookies) => { manager.setCookies(cookies, function(err) { if (err) { console.log(red,err); process.exit(1); // Fatal error since we couldn't get our API key return; } console.log(green,"Got API key: " + manager.apiKey); webapi=manager.apiKey //fetchActiveTradeOffers(); // Call the function } ); -
the NewOffers event in the steam trader offer manager no longer posts trader offers nor the trade status change after the cs2 update i think this need to be updated