node-linebot-message-handler
A module to make it more easy to handle LINE bot message, and wrapping some original Client APIs.
Install
npm install node-linebot-message-handler --save
Usage
;;; ; msgHandler// emit `text` event on recieving text message.on'text', // 'location' and 'sticker' are same as 'text'..on'location', .on'sticker', // emit `image` event on recieving image message.on'image', // 'video', 'audio' and 'file' are same as `image`..on'video', .on'audio', .on'file', // emit `invalid` event on failing to validate the message signature.on'invalid', ; // set recieved message, then above listeners will be called.msgHandler.setRecievedMessagedata.toString, ; // you can access original client through MessageHandler#getClient() and use original APIs (i.e. pushMessage, broadcast, etc)msgHandler.getClient.broadcast;