mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 09:18:27 -04:00
fix: Translate command will no longer fail if the user capitalizes the language name
This commit is contained in:
@@ -100,7 +100,7 @@ public sealed class TranslateService : ITranslateService, IExecNoCommand, IReady
|
||||
if (string.IsNullOrWhiteSpace(text))
|
||||
throw new ArgumentException("Text is empty or null", nameof(text));
|
||||
|
||||
var res = await _google.Translate(text, source, target);
|
||||
var res = await _google.Translate(text, source.ToLowerInvariant(), target.ToLowerInvariant());
|
||||
return res.SanitizeMentions(true);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user