From b82c2f0dcb986bcb84fd6fc62cdcbf5f748f3ed5 Mon Sep 17 00:00:00 2001 From: dragonfire535 Date: Sat, 11 Mar 2017 19:59:32 -0500 Subject: [PATCH] Fix bug in Yoda lol --- commands/textedit/yoda.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/commands/textedit/yoda.js b/commands/textedit/yoda.js index d0315b19..e6b1484f 100644 --- a/commands/textedit/yoda.js +++ b/commands/textedit/yoda.js @@ -19,7 +19,7 @@ class YodaCommand extends commando.Command { if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return; } console.log("[Command] " + message.content); - let yodaspeak = message.content.split(" ").slice(1).join("-"); + let yodaspeak = message.content.split(" ").slice(1).join("+"); if(yodaspeak === "") { message.channel.sendMessage(':x: Error! Nothing to translate!'); } else { @@ -39,8 +39,7 @@ class YodaCommand extends commando.Command { if(response === undefined) { message.channel.sendMessage(':x: Error! Something went wrong! Keep it simple to avoid this error.'); } else { - let translated = response.split('-').join(" "); - message.channel.sendMessage(translated).catch(error => message.channel.sendMessage(':x: Error! Something went wrong! Keep it simple to avoid this error.')); + message.channel.sendMessage(response).catch(error => message.channel.sendMessage(':x: Error! Something went wrong! Keep it simple to avoid this error.')); } }).catch(function (err) { message.channel.sendMessage(":x: Error! Unknown Error. Try again later!");