Koncealed 0 Posted March 31 Report Share Posted March 31 Hello, I worked on projects where I could use async await to try to make my functions a bit cleaner instead of falling into callback hell. So I wrote this below. async _fetchInventory() { this.inventory = await this.tradeOfferBot.getInventoryContents(this.GAME_CODE, 2, true); console.log('Below is from the fetch inventory function.'); console.log(this.inventory); } I want to add the items into a variable inside of my class. Is this possible? Thanks! Quote Link to post Share on other sites
Dr. McKay 367 Posted March 31 Report Share Posted March 31 steam-tradeoffer-manager does not presently support promises (async/await), although that's planned for the near future. In the meantime, you'll need to wrap the call in a Promise. Quote Link to post Share on other sites
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.