Bug Fixes

This commit is contained in:
Daniel Odendahl Jr
2017-08-17 01:23:34 +00:00
parent 6c7c110a9b
commit f3e48b6745
2 changed files with 8 additions and 6 deletions
+4 -3
View File
@@ -16,9 +16,10 @@ module.exports = class EmojifyCommand extends Command {
prompt: 'What text would you like to convert to emoji?',
type: 'string',
validate: text => {
if (letterTrans(text, dictionary).length < 2000) return true;
if (letterTrans(text.toLowerCase(), dictionary).length < 2000) return true;
return 'Your text is too long.';
}
},
parse: text => text.toLowerCase()
}
]
});
@@ -26,6 +27,6 @@ module.exports = class EmojifyCommand extends Command {
run(msg, args) {
const { text } = args;
return msg.say(letterTrans(text.toLowerCase(), dictionary));
return msg.say(letterTrans(text, dictionary));
}
};
+4 -3
View File
@@ -15,9 +15,10 @@ module.exports = class MorseCommand extends Command {
prompt: 'What text would you like to convert to morse?',
type: 'string',
validate: text => {
if (letterTrans(text, dictionary, ' ').length < 2000) return true;
if (letterTrans(text.toLowerCase(), dictionary, ' ').length < 2000) return true;
return 'Your text is too long.';
}
},
parse: text => text.toLowerCase()
}
]
});
@@ -25,6 +26,6 @@ module.exports = class MorseCommand extends Command {
run(msg, args) {
const { text } = args;
return msg.say(letterTrans(text.toLowerCase(), dictionary, ' '));
return msg.say(letterTrans(text, dictionary, ' '));
}
};