Skip to content

Instantly share code, notes, and snippets.

@donpdonp
Last active December 9, 2015 22:58
Show Gist options
  • Save donpdonp/4340582 to your computer and use it in GitHub Desktop.
Save donpdonp/4340582 to your computer and use it in GitHub Desktop.
neuronbot coderwall
function(msg) {
var cmd = /^coderwall\s+(\S+)/
var match = cmd.exec(msg.message)
if(match) {
var username = match[1]
var profile = JSON.parse(http.get("https://coderwall.com/"+username+".json"))
var badge_list = profile.badges.map(function(b){return b.name})
return badge_list.join(', ')
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment