= require('botkit'); var bot = Botkit.slackbot({ clientId: process.env.clientId, clientSecret: process.env.clientSecret, studio_token: process.env.studio_token, }); // Set up a simple webserver to // receive incoming messages via webhook. bot.setupWebserver(process.env.port,function(err,webserver) { bot.createWebhookEndpoints(bot.webserver); bot.createOauthEndpoints(bot.webserver); }); // Tell the bot to listen for users saying "hello," // and use `bot.reply` to send an immediate response. bot.hears('hello','direct_mention,direct_message', function(bot, message) { bot.reply(message,'Howdy!'); });