Skip to content
This repository has been archived by the owner on Jun 8, 2023. It is now read-only.

Adds "clipart me" command that returns clipart images from the openclipart API #1183

Closed
wants to merge 2 commits into from

Conversation

desmondmorris
Copy link
Contributor

No description provided.

@technicalpickles
Copy link
Contributor

We are actually moving away from adding scripts to repository in favor of separate npm packages per scripts. See #1113 for details, and let us know if you have any questions about getting going with that!

# hubot clipart me <query> - Queries openclipart for <query> and returns a random result.

module.exports = (robot) ->
robot.respond /(clipart)( me)? (.*)/i, (msg) ->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's probably not worth capturing (clipart), since you don't use it. Nor is the optional me used. That means you could refactor to:

/clipart(?: me)? (.*)/

And then you'd be able to use msg.match[1] below.

@desmondmorris
Copy link
Contributor Author

@technicalpickles thanks for this. I will update and resubmit as its on package.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants