De-pres Posted May 27, 2022 Report Share Posted May 27, 2022 While offer.accept() works fine but for some reason offer.decline() gives me an error Error: HTTP error 404 at SteamCommunity._checkHttpError (C:\Users\HP\node_modules\steamcommunity\components\http.js:108:9) at Request._callback (C:\Users\HP\node_modules\steamcommunity\components\http.js:50:61) at Request.self.callback (C:\Users\HP\node_modules\request\request.js:185:22) at Request.emit (events.js:400:28) at Request.<anonymous> (C:\Users\HP\node_modules\request\request.js:1154:10) at Request.emit (events.js:400:28) at IncomingMessage.<anonymous> (C:\Users\HP\node_modules\request\request.js:1076:12) at Object.onceWrapper (events.js:519:28) at IncomingMessage.emit (events.js:412:35) at endReadableNT (internal/streams/readable.js:1334:12) { code: 404, body: '<html>\n' + '<head>\n' + '<title>404 Not Found</title>\n' + '</head>\n' + '<body>\n' + '<h1>Not Found</h1>\n' + '</body>\n' + '</html>' } Here are those 2 functions that i use for accept and decline offer function acceptOffer(offer){ offer.accept((err) =>{ community.checkConfirmations(); console.log("offer accepted"); console.log("trader id: "+offer.partner.getSteamID64()); if(offer.partner.getSteamID64() != config.ownerID){ client.chatMessage(offer.partner.getSteamID64(),"Offer accepted. Thanks for an offer"); } if (err){ console.log("there was an error in accepting") console.log(err); client.chatMessage(offer.partner.getSteamID64(),"There was en error to accept offer. Try again leater"); } }); } function declineOffer(offer){ if (offer.partner.getSteamID64() == config.ownerID){ acceptOffer(offer); console.log("hi"); }else{ offer.decline((err) =>{ console.log("offer decliend"); console.log("trader id: "+offer.partner.getSteamID64()); if (err) console.log("there was an error in declining"); console.log(err) }); } } Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted May 27, 2022 Report Share Posted May 27, 2022 Update the module to the latest version. De-pres 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.