Simplify config and add user white list

This commit is contained in:
2025-08-14 12:25:58 +03:00
parent 137da5a893
commit aae83db2ea
4 changed files with 65 additions and 51 deletions

13
main.go
View File

@@ -100,12 +100,12 @@ func main() {
converter := ffmpegconv.NewFfmpegConverter()
recognizer, err := yandex.NewYandexAudioRecognizerService(yandex.YandexAudioRecognizerConfig{
Region: cfg.AWS.Region,
AccessKey: cfg.AWS.AccessKey,
SecretKey: cfg.AWS.SecretKey,
BucketName: cfg.AWS.BucketName,
Endpoint: cfg.AWS.Endpoint,
ApiKey: cfg.Yandex.APIKey,
Region: cfg.Yandex.ObjStorageRegion,
AccessKey: cfg.Yandex.ObjStorageAccessKey,
SecretKey: cfg.Yandex.ObjStorageSecretKey,
BucketName: cfg.Yandex.ObjStorageBucketName,
Endpoint: cfg.Yandex.ObjStorageEndpoint,
ApiKey: cfg.Yandex.SpeechKitAPIKey,
FolderID: cfg.Yandex.FolderID,
})
if err != nil {
@@ -127,6 +127,7 @@ func main() {
tgConfig := tgcontroller.TelegramConfig{
BotToken: cfg.Telegram.BotToken,
UpdateTimeout: cfg.Telegram.UpdateTimeout,
UserWhiteList: cfg.Server.UsersWhiteList,
}
// Создаем Telegram бот