Lonster_Monster Posted February 5, 2018 Report Posted February 5, 2018 (edited) I have been working on a tradelog code and i need to get the (offer) from the trade when it processes the trade i dont know the correct way to export the offer from manager.on('newOffer', (offer) => { processOffer(offer); }); Edited February 5, 2018 by Lonster_Monster Quote
McMuffinDK Posted February 5, 2018 Report Posted February 5, 2018 If your function is processOffer() you can do this: function processOffer(offer) { // do something with offer } manager.on('newOffer', (offer) => { processOffer(offer); } Quote
Lonster_Monster Posted February 6, 2018 Author Report Posted February 6, 2018 I have the processOffer i want to export the (offer) part to another file how would i do that? Quote
McMuffinDK Posted February 6, 2018 Report Posted February 6, 2018 I have the processOffer i want to export the (offer) part to another file how would i do that? What is the other file? Is it javascript? A text document? What is the file used for? Quote
Lonster_Monster Posted February 7, 2018 Author Report Posted February 7, 2018 What is the other file? Is it javascript? A text document? What is the file used for?It will be a js file i want to make a trade logger but dont know how to call the (offer) from another file i dont know how to export it Quote
McMuffinDK Posted February 7, 2018 Report Posted February 7, 2018 You can use my npm module node-my-log or use module.exports Quote
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.