forked from GitHub/dbot
more reasonable ~define
Tell wordnik to use the canonical version of the word where available (to avoid responses like "the plural of 'cat'" when doing "~define cats" - just tell me what cats are dammit)
This commit is contained in:
parent
93ee3cb08b
commit
a574b7d2ed
@ -5,7 +5,7 @@ var words = function(dbot) {
|
|||||||
this.commands = {
|
this.commands = {
|
||||||
'~define': function(event) {
|
'~define': function(event) {
|
||||||
var query = event.params.slice(1).join(" ");
|
var query = event.params.slice(1).join(" ");
|
||||||
this.wn.definitions(encodeURIComponent(query), function(err, defs) {
|
this.wn.definitions(encodeURIComponent(query), { useCanonical: true }, function(err, defs) {
|
||||||
if(!err && defs[0]) {
|
if(!err && defs[0]) {
|
||||||
event.reply(dbot.t('def', {
|
event.reply(dbot.t('def', {
|
||||||
'word': query,
|
'word': query,
|
||||||
|
Loading…
Reference in New Issue
Block a user