Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feeling ducky search #60

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

feeling ducky search #60

wants to merge 1 commit into from

Conversation

hagb4rd
Copy link

@hagb4rd hagb4rd commented Aug 16, 2016

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 ;)

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(" ", "+"))) + " "; };
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be encodeURIComponent?

@brigand
Copy link
Contributor

brigand commented Aug 17, 2016

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?

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

Successfully merging this pull request may close these issues.

2 participants