hubot-urban-dictionary
v1.0.5
Published
A package for Hubot that allows you to look up definitions via Urban Dictionary.
Downloads
2
Maintainers
Readme
hubot-urban-dictionary
An npm package for Hubot that allows you to look up definitions via Urban Dictionary.
Note:
Be aware that this script usually returns responses that are NSFW so use at your own risk...
Installation
You need to set up an account with Mashape in order to use this package. Once you have signed up:
- Add a new application
- Go to the Mashape Urban Dictionary API to create a X-Mashape-Key for your new application
- Grab your X-Mashape-Key from your curl REQUEST EXAMPLE
- Add your key to your enviornment variables with the name HUBOT_MASHAPE_KEY
- Add hubot-urban-dictionary to your dependancies in the package.json file and in your exteranl-scripts.json file (Note that you will also need to grab the latest version from NPM to add to the package.json)
- Run
npm install
to download the package - Restart you hubot
- Enjoy ;)
Usage
This package listens for the word define
and returns the first definition and
examples from Urban Dictionary. The response was formatted specifically for
Slack.
Example:
define stories
Returns:
Definition:
What white-trash call Television shows.
Example:
Bubba, run to the Piggly Wiggly and pick mamma up some smokes. I don't want to miss my stories.
Contributions
Thanks to Justin Licata for providing the 'define' regex!
License
See LICENSE for details.