TypeError: DialogflowHandle.handleMessage is not a function
DialogflowHandle.handleMessage(message.body) // here notify handle not a funtion.
And here is class:
const dialogflow = require('dialogflow');
class DialogflowHandle {
handleMessage (sentence) {
this.request.queryInput.text.text = sentence
return new Promise(
(resolve, reject) => {
this.sessionClient.detectIntent(this.request)
.then(resolve)
.catch(reject);
}
)
}
}