Skip to content

Instantly share code, notes, and snippets.

@trevoro
Created August 14, 2015 03:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trevoro/3a9dec9b001dab2ee3a0 to your computer and use it in GitHub Desktop.
Save trevoro/3a9dec9b001dab2ee3a0 to your computer and use it in GitHub Desktop.
// 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