title: Is not a function error with module.exports
body: <p>when i try to <code>callSendAPI</code> in <code>waether.js</code> it shows error not <code>callSendAPI</code> is not a function</p>
  
  <p><code>weather.js</code></p>
  
  <pre><code>const request = require('request');
  const config = require('./config');
  const messages = require('./messages');
  
  weatherAsQuickReply = (messageData) =&gt; {
    let replies = [{
       "content_type": "location"
    }];
  
    let sendQuickReply = {
      recipient: {
        id: messageData.recipient.id
      },
      message: {
        text: messageData.message.text,
        quick_replies: replies
      }
    };
  
    messages.callSendAPI(sendQuickReply);
  }
  
  getWeather = (result, messageData) =&gt; {
    let city = result.parameters["geo-city"];
    if (city != '') {
      request({
        url: 'https://api.apixu.com/v1/current.json',
        qs: {
          q: city,
          key: config.WEATHER_APP_ID,
        },
      }, function (error, response, body) {
    if (!error &amp;&amp; response.statusCode === 200) {
      let weather = JSON.parse(body);
  
      if (weather.hasOwnProperty("current")) {
        let reply = `Location: ${weather.location.region}
                       Temperature: ${weather.current.temp_c},
                       ${weather.current.condition.text}`;
        messageData.message.text = reply;
        messages.callSendAPI(messageData);
      };
    } else {
      return res.status(400).json({
        status: {
          code: 400,
          errorType: 'I failed to look up the city name.'
        }
      });
  
    }
  });
  }  else {
       weatherAsQuickReply(messageData);
     } 
  }
  
  module.exports = {
    weatherAsQuickReply: weatherAsQuickReply,
    getWeather: getWeather
  }
  </code></pre>
  
  <p><code>message.js</code></p>
  
  <pre><code>const request = require('request');
  const config = require('./config');
  const weather = require('./weather');
  
  const apiaiApp = require('apiai')(config.API_AI_CLIENT_ACCESS_TOKEN);
  
   callSendAPI = (messageData) =&gt; {
      request({
         uri: 'https://graph.facebook.com/v2.6/me/messages',
         qs: {
            access_token: config.FB_PAGE_TOKEN
         },
         method: 'POST',
         json: messageData
  
  }, function (error, response, body) {
      if (!error &amp;&amp; response.statusCode == 200) {
          var recipientId = body.recipient_id;
          var messageId = body.message_id;
  
          if (messageId) {
              console.log("Successfully sent message with id %s to recipient %s",
                  messageId, recipientId);
          } else {
              console.log("Successfully called Send API for recipient %s",
                  recipientId);
          }
      } else {
          console.error("Failed calling Send API", response.statusCode, response.statusMessage, body.error);
      }
  });
  }
  
  sendMessage = (event) =&gt; {
     let sender = event.sender.id;
     let text = event.message.text;
  
     let apiai = apiaiApp.textRequest(text, {
       sessionId: 'minaaaaa213'
  });
  
  apiai.on('response', (response) =&gt; {
      console.log(response);
      let aiText = response.result.fulfillment.speech;
      let result = response.result;
      let messageData = {
          recipient: {id: sender},
          message: {text: aiText}
      };
      if (response.result.action === 'weather') {
          console.log('weather');
          weather.getWeather(result, messageData);
  
      } else {
          callSendAPI(messageData);
      }
  
  });
  
  apiai.on('error', (error) =&gt; {
      console.log('err: ' + error);
  });
  
  apiai.end();
  }
  
  module.exports = {
    callSendAPI: callSendAPI,
    sendMessage: sendMessage
  }
  </code></pre>