Skip to content

Instantly share code, notes, and snippets.

@ctborg
Created December 17, 2014 16:28
Show Gist options
  • Save ctborg/04cabebaf5909216654b to your computer and use it in GitHub Desktop.
Save ctborg/04cabebaf5909216654b to your computer and use it in GitHub Desktop.
Simple slack bot client
Client = require('slack-client');
var client = new Client(process.env.BOT_SLACK_TOKEN);
client.on( 'error', function(e){console.log(e)});
client.on( 'loggedIn', function(e){console.log(e)});
client.on( 'open', function(e){console.log(e)});
client.on( 'close', function(e){console.log(e)});
client.on( 'message', function(e){console.log(e)});
client.on( 'userChange', function(e){console.log(e)});
client.login();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment