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:
Scritches 2018-04-10 16:06:38 -04:00
parent 93ee3cb08b
commit a574b7d2ed

View File

@ -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,