Build a Slackbot using Hubot

hubot
$ mkdir alfred
$ cd alfred
yo hubot
alfred ping
  • You must place the CoffeeScript or the JS in thescripts directory
  • You must have to export the function from the script
cd scripts
# Description:
# Alfred Hubot
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
# hubot hello
#
# Author:
# pradipta.sarma
module.exports = (robot) ->
#Your code here
models.respond /hello/i, (res) ->
res.reply("Hey, what's up?")
alfred hello
module.exports = (robot) ->
robot.respond /hello/i, (res) ->
res.reply("Hey "+res.envelope.user.name+", what's up?")
Slack App Integration

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store