From 1217162def6a917eac020f444c5addd1db422279 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Tue, 8 Nov 2016 19:28:18 +0100 Subject: [PATCH] Autotranslate QOL + fix --- src/NadekoBot/Modules/Searches/Commands/Translator.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Searches/Commands/Translator.cs b/src/NadekoBot/Modules/Searches/Commands/Translator.cs index f82b1a98..8c588cf0 100644 --- a/src/NadekoBot/Modules/Searches/Commands/Translator.cs +++ b/src/NadekoBot/Modules/Searches/Commands/Translator.cs @@ -59,7 +59,7 @@ namespace NadekoBot.Modules.Searches .ConfigureAwait(false); if (autoDelete) try { await umsg.DeleteAsync().ConfigureAwait(false); } catch { } - await umsg.Channel.SendMessageAsync($"{umsg.Author.Mention} `said:` "+text.Replace("<@ ", "<@").Replace("<@! ", "<@!")).ConfigureAwait(false); + await umsg.Channel.SendMessageAsync($"{umsg.Author.Mention} `:` "+text.Replace("<@ ", "<@").Replace("<@! ", "<@!")).ConfigureAwait(false); } catch { } @@ -161,6 +161,7 @@ namespace NadekoBot.Modules.Searches if (!GoogleTranslator.Instance.Languages.Contains(from) || !GoogleTranslator.Instance.Languages.Contains(to)) { try { await channel.SendMessageAsync("`Invalid source and/or target Language.`").ConfigureAwait(false); } catch { } + return; } UserLanguages.AddOrUpdate(ucp, langs, (key, val) => langs);