Created
August 14, 2015 03:29
-
-
Save trevoro/3a9dec9b001dab2ee3a0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Description: | |
// Milton basic commands. | |
import Slack from 'node-slack'; | |
let slack = new Slack('https://hooks.slack.com/services/something/reallysecure'); | |
function johnnyBomb (msg) { | |
slack.send({ | |
text: 'DESTROY! DESTROY!', | |
channel: `#${msg.message.room}`, | |
username: 'Milton', | |
attachments: [ | |
{ 'image_url': 'http://imgur.com/IiRg53h.jpg' }, | |
{ 'image_url': 'http://imgur.com/bfp2vS1.jpg' }, | |
{ 'image_url': 'http://imgur.com/7L2jeRN.jpg' } | |
] | |
}); | |
return null; | |
} | |
module.exports = function(robot) { | |
robot.respond(/hello/i, function(msg) { | |
return msg.reply("Hey."); | |
}); | |
robot.respond(/johnny ive/i, johnnyBomb) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment