-
Posts
9 -
Joined
-
Last visited
Posts posted by Verize
-
-
If you haven't figured it out by now: The confirmation checker is probably getting you rate-limited. That happens if you are sending many requests in a relatively short period of time. That's why the confirmation checker is deprecated - because it does exactly this. Accept all incoming and outgoing offers manually with the method
acceptConfirmationForObject()
-
As far as I understand, the assetid, that is needed to identify a specific item, can change after a trade. When sending an offer and the other party accepts it, how can I get the new assetids of the received items, so I can save the ids in my database and use them, later on, to identify the items and send them? Is there a method that I can call on the 'sentOfferChanged' event to get the new assetids?
That's all I want to know. Thanks! -
Actually, nothing. Sorry, it was a pretty nifty mistake on my side, forgot the trade link field in my mongoose model. Works all fine now
-
When creating a new trade offer I get following error:
TypeError: Cannot read property 'isValid' of undefined at new TradeOffer (C:\Users\JP\SteamBots\node_modules\steam-tradeoffer-manager\lib\classes\TradeOffer.js:19:19) at TradeOfferManager.createOffer (C:\Users\JP\SteamBots\node_modules\steam-tradeoffer-manager\lib\index.js:386:14) at SteamManager.sendSmallPotWinnings (C:\Users\JP\SteamBots\lib\SteamManager.js:327:29) at SmallPot.getRoundById (C:\Users\JP\SteamBots\server.js:704:11) at model.Query.<anonymous> (C:\Users\JP\SteamBots\node_modules\mongoose\lib\model.js:3919:16) at C:\Users\JP\SteamBots\node_modules\kareem\index.js:273:21 at C:\Users\JP\SteamBots\node_modules\kareem\index.js:131:16 at _combinedTickCallback (internal/process/next_tick.js:131:7) at process._tickCallback (internal/process/next_tick.js:180:9)
The only thing I am doing is this:let offer = manager.createOffer(tradelink);What exactly is happening here? Thanks in advance
-
Fixed it. Somehow my value parameter was not a number.. I changed the field to string in my mongoose model and now it works.
-
So before I send a trade offer to a user I save general details about the trade to my MongoDB database. But I get following error:
This is a code snippet of the function that causes the error:
Trade.newTrade is a function that saves the trade info to my database.
What does this mean?
-
Is there any way to get just parts of the items name? For example the market_hash_name is StatTrakâ„¢ Tec-9 | Isaac (Field-Tested). How can I get/extract just the weapon name (Tec-9) or the skin name (Isaac)? I'm sorry if this question has already been asked, I couldn't find any info about it. Thanks
-
This may be a more general question but I hope you can still help me. I have following code:
bot.js
I created a class which I export using module.exports and can now import in other files. (To keep my code organized)
class SteamBot {constructor(logOnOptions){this.client = new SteamUser();this.community = new SteamCommunity();this.manager = new TradeOfferManager({steam: this.client,community: this.community,language: 'en'});this.logOn(logOnOptions);}logOn(logOnOptions){[...]}getUserInventory(sid, gameid, contextid, onlyTradeable, callback){this.manager.getUserInventoryContents(sid, gameid, contextid, onlyTradeable, (err, inventory) => {if(err){console.log(err);callback(new Error('Could not fetch user inventory'), false);} else {if(inventory){callback(err, inventory)}}})}}module.exports = SteamBot;in another file (app.js) I then require the file above (bot.js) and instantiate a new bot:
const SteamBot = require('./bots/bot.js');const bot = new SteamBot({accountName: config.botusername,password: config.botpassword,twoFactorCode: SteamTotp.generateAuthCode(config.botsharedsecret)});So far everything works. I can call the function getUserInventory() by typing bot.getUserInventory(). What I am currently trying to solve is: I need to use the function in other files also (more specifically my router files) and I don't want to instantiate a new bot since it wouldn't be practical. How exactly can I do this? Thanks
Keeping track of items - Get new AssetIDs
in node-steam-tradeoffer-manager
Posted
Got it. The getExchangeDetails Method of the trade offer object is the way to go.