mirror of
				https://gitlab.com/Kwoth/nadekobot.git
				synced 2025-11-04 00:34:26 -05: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