From b3a351fdc4dddc1b5a77a7de5ef6924315d52040 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Sat, 20 May 2017 04:14:58 +0000 Subject: [PATCH] Fix Translate --- commands/textedit/translate.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/commands/textedit/translate.js b/commands/textedit/translate.js index 95605937..963169e9 100644 --- a/commands/textedit/translate.js +++ b/commands/textedit/translate.js @@ -23,8 +23,8 @@ module.exports = class TranslateCommand extends Command { prompt: 'Which language is being translated to?', type: 'string', validate: to => { - if (codes[to.toLowerCase()] || Object.values(codes).map(c => c.toLowerCase()).includes(to.toLowerCase())) return true; - return 'Invalid Language Code or Language Name. Use `help translate` for a list of codes.'; + if (codes[to.toLowerCase()]) return true; + return 'Invalid Language Code. Use `help translate` for a list of codes.'; }, parse: to => to.toLowerCase() }, @@ -33,8 +33,8 @@ module.exports = class TranslateCommand extends Command { prompt: 'Which language is being translated from?', type: 'string', validate: from => { - if (codes[from.toLowerCase()] || Object.values(codes).map(c => c.toLowerCase()).includes(from.toLowerCase())) return true; - return 'Invalid Language Code or Language Name. Use `help translate` for a list of codes.'; + if (codes[from.toLowerCase()]) return true; + return 'Invalid Language Code. Use `help translate` for a list of codes.'; }, parse: from => from.toLowerCase(), default: ''