Simplify config and add user white list
This commit is contained in:
13
main.go
13
main.go
@@ -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 бот
|
||||
|
Reference in New Issue
Block a user