Skip to content
This repository has been archived by the owner before Nov 9, 2022. It is now read-only.
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time
# Description:
# Find a Drupal module using
# Dependencies:
# None
# Configuration:
# None
# Commands:
# hubot there's a module for <that>
# hubot module me <something> - Returns links to modules or themes on
# Author:
# henrrrik
module.exports = (robot) ->
robot.hear /there's a module for (.*)/i, (msg) ->
puppySearch msg, msg.match[1]
robot.respond /module me (.*)/i, (msg) ->
puppySearch msg, msg.match[1]
puppySearch = (msg, query) ->
.query(query: query)
.get() (err, res, body) ->
results = JSON.parse(body)
for result in results[0..30]
modules.push "#{result.project.title}: #{}"
if modules.length>0 then msg.send modules.join('\n') else msg.send "Actually, there isn't a module for that!"