feeling ducky search#60
Open
hagb4rd wants to merge 1 commit intooftn-oswg:masterfrom
Open
Conversation
Update: Registered a new command as an equivalent replacement for googles no more working lucky search. Returns a link to the first result of a duckduckgo.com search. Usage: !s text Annotation: Like in google, results can be restricted to a specified site adding site:<url> to the query text - this way, eventually more shortcut-commands could be added. Greetz ;)
| context.channel.send_reply (context.sender, this.get_command_help("s")); | ||
| return; | ||
| } | ||
| var ducky = function ducky(query) { return " search: " + query + " => https://duckduckgo.com/?q=!ducky+%q".replace("%q", encodeURI(query.replace(" ", "+"))) + " "; }; |
Contributor
There was a problem hiding this comment.
Should be encodeURIComponent?
Contributor
|
It's pretty bad that we don't get the url and title in chat. I think it'd be better if we implemented bing. They have a free tier which should be enough for us, but it does require an api key. The #css bot, Selvvir, changed to bing when the google search api died. Also we should probably keep !g working, even if not implemented as google, since people are used to using it. @hagb4rd want to take a stab at implementing this? |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update:
Registered a new command as an equivalent replacement for googles no more working lucky search. Returns a link
to the first result of a duckduckgo.com search.
Usage: !s text
Annotation:
Like in google, results can be restricted to a specified site adding site: to the query text - this way, eventually more shortcut-commands could be added.
Greetz ;)