From a574b7d2edf9dc8ec6bd90cedd7824c0ee0a8f65 Mon Sep 17 00:00:00 2001 From: Scritches Date: Tue, 10 Apr 2018 16:06:38 -0400 Subject: [PATCH] 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) --- modules/words/words.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/words/words.js b/modules/words/words.js index ef7d0de..34fbd30 100644 --- a/modules/words/words.js +++ b/modules/words/words.js @@ -5,7 +5,7 @@ var words = function(dbot) { this.commands = { '~define': function(event) { 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]) { event.reply(dbot.t('def', { 'word': query,