Jump to content
McKay Development

'callback is not a function' in send()


tony

Recommended Posts

Hello. Sending a trade offer from bot is the last part before my site is ready but I can't get it work.

var newOffer = manager.createOffer("https://steamcommunity.com/tradeoffer/new/?partner=240789497&token=ORC28YoI");
newOffer.addMyItems(currentGame);
newOffer.send("You just won a bet", function(err, status) {
    console.log(newOffer);
    if(pending > 0) {
        handleOffers();
    }
});
C:\xampp\htdocs\js\node_modules\steam-tradeoffer-manager\lib\helpers.js:29
                        callback(error);
                        ^


TypeError: callback is not a function
    at Object.exports.makeAnError (C:\xampp\htdocs\js\node_modules\steam-tradeoffer-manager\lib\helpers.js:29:4)
    at SteamCommunity.manager._community.httpRequestPost (C:\xampp\htdocs\js\node_modules\steam-tradeoffer-manager\lib\classes\TradeOffer.js:507:12)
    at Request._callback (C:\xampp\htdocs\js\node_modules\steamcommunity\components\http.js:67:15)
    at Request.self.callback (C:\xampp\htdocs\js\node_modules\request\request.js:186:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:191:7)
    at Request.<anonymous> (C:\xampp\htdocs\js\node_modules\request\request.js:1081:10)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:188:7)
    at IncomingMessage.<anonymous> (C:\xampp\htdocs\js\node_modules\request\request.js:1001:12)
Edited by tony
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...