Created
May 7, 2015 17:28
-
-
Save walaura/7a72f3cde025301301a8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var Slack = require('slack-client'); | |
var slack = new Slack('your-token', true, true); | |
slack.on('open', function() { | |
for (id in slack.channels) { | |
if (slack.channels[id].is_member) { | |
console.log([id,slack.channels[id].name]); | |
} | |
} | |
}); | |
slack.on('error', function(error) { | |
return console.error("Error: " + error); | |
}); | |
slack.login(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment