diff --git a/main.go b/main.go index 882232f..1f83236 100644 --- a/main.go +++ b/main.go @@ -724,11 +724,16 @@ func getMatchChat(w http.ResponseWriter, r *http.Request) { log.Warningf("[GMC] Unable to unmarshal JSON from DeepL: %v", err) goto sendNormalResp } + + if strings.ToLower(dlRespJSON.Translations[0].DetectedSourceLanguage) == lang.String() { + goto sendNormalResp + } + resp[steamid] = append(resp[steamid], &utils.ChatResponse{ Message: dlRespJSON.Translations[0].Text, AllChat: stat.AllChat, Tick: stat.Tick, - TranslatedFrom: dlRespJSON.Translations[0].DetectedSourceLanguage, + TranslatedFrom: strings.ToLower(dlRespJSON.Translations[0].DetectedSourceLanguage), TranslatedTo: lang.String(), }) }