refactor: change translation config

This commit is contained in:
Noah 2025-10-13 14:38:15 +02:00
parent f3dec30b56
commit f445fef85a
No known key found for this signature in database
GPG key ID: D2A7E2C8F77E0430
2 changed files with 10 additions and 7 deletions

View file

@ -18,12 +18,12 @@ var TargetLanguages map[string]string
func Init() {
log.Info().Msg("Translation is enabled, creating HTTP client for DeepL API")
baseURL := baseURLPro
if config.BotConfig.DeepLFreeTier {
if config.BotConfig.DeepL.FreeTier {
baseURL = baseURLFree
}
client = &apiClient{
authKey: config.BotConfig.DeepLAPIKey,
authKey: config.BotConfig.DeepL.APIKey,
baseURL: baseURL,
httpClient: &http.Client{Timeout: 30 * time.Second},
}