This repository has been archived by the owner on Jun 8, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
131 additions
and
35 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
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
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
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 |
---|---|---|
@@ -1,15 +1,23 @@ | ||
# Tell Hubot to send a user a link to lmgtfy.com | ||
# | ||
# lmgtfy <optional @username> <some query> | ||
# Description: | ||
# Tell Hubot to send a user a link to lmgtfy.com | ||
# | ||
# Examples | ||
# Dependencies: | ||
# None | ||
# | ||
# lmgtfy trollface zomg | ||
# lmgtf @Tyler font kerning | ||
# Configuration: | ||
# None | ||
# | ||
# Commands: | ||
# hubot lmgtfy <optional @username> <some query> | ||
# | ||
# Author: | ||
# phlipper | ||
# | ||
|
||
module.exports = (robot) -> | ||
robot.respond /lmgtfy?\s?(?:@(\w*))? (.*)/i, (msg) -> | ||
link = "" | ||
link += "#{msg.match[1]}: " if msg.match[1] | ||
link += "http://lmgtfy.com/?q=#{escape(msg.match[2])}" | ||
msg.send link | ||
msg.send link |
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
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
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
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