Skip to content

Instantly share code, notes, and snippets.

@perfectmak
Created May 14, 2016 10:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save perfectmak/22af06d57bc0929a2412ab33784dbe38 to your computer and use it in GitHub Desktop.
Save perfectmak/22af06d57bc0929a2412ab33784dbe38 to your computer and use it in GitHub Desktop.
const pinger = require('./ping-bot');
//listen for direct message and direct mention events
controller.on(['direct_message', 'direct_mention'], (bot, message) => {
pinger(message.text, (response) => {
//send message reply to users
bot.reply(message, response);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment