-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added ascii, chat and chuck-norris scripts from ...
- Loading branch information
1 parent
1a3516a
commit 1027a2d
Showing
3 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Description: | ||
# ASCII art | ||
# | ||
# Dependencies: | ||
# None | ||
# | ||
# Configuration: | ||
# None | ||
# | ||
# Commands: | ||
# hubot ascii me <text> - Show text in ascii art | ||
# | ||
# Author: | ||
# atmos | ||
|
||
module.exports = (robot) -> | ||
robot.respond /ascii( me)? (.+)/i, (msg) -> | ||
msg | ||
.http("http://asciime.heroku.com/generate_ascii") | ||
.query(s: msg.match[2]) | ||
.get() (err, res, body) -> | ||
msg.send body |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Description: | ||
# Start up some wonderful chats with conversation starters | ||
# | ||
# Dependencies: | ||
# None | ||
# | ||
# Configuration: | ||
# None | ||
# | ||
# Commands: | ||
# hubot chat - Tell hubot to make something fun to chat about | ||
# | ||
# Author: | ||
# GantMan | ||
|
||
module.exports = (robot) -> | ||
robot.respond /chat/i, (msg) -> | ||
msg.http("http://chatoms.com/chatom.json?Normal=1&Fun=2&Philosophy=3&Out+There=4&Love=5&Personal=7") | ||
.get() (err, res, body) -> | ||
msg.send JSON.parse(body).text |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Description: | ||
# Chuck Norris awesomeness | ||
# | ||
# Dependencies: | ||
# None | ||
# | ||
# Configuration: | ||
# None | ||
# | ||
# Commands: | ||
# hubot chuck norris -- random Chuck Norris awesomeness | ||
# hubot chuck norris me <user> -- let's see how <user> would do as Chuck Norris | ||
# | ||
# Author: | ||
# dlinsin | ||
|
||
module.exports = (robot) -> | ||
|
||
robot.respond /(chuck norris)( me )?(.*)/i, (msg)-> | ||
user = msg.match[3] | ||
if user.length == 0 | ||
askChuck msg, "http://api.icndb.com/jokes/random" | ||
else | ||
askChuck msg, "http://api.icndb.com/jokes/random?firstName="+user+"&lastName=" | ||
|
||
askChuck = (msg, url) -> | ||
msg.http(url) | ||
.get() (err, res, body) -> | ||
if err | ||
msg.send "Chuck Norris says: #{err}" | ||
else | ||
message_from_chuck = JSON.parse(body) | ||
if message_from_chuck.length == 0 | ||
msg.send "Achievement unlocked: Chuck Norris is quiet!" | ||
else | ||
msg.send message_from_chuck.value.joke |