diff --git a/kreacher/clients.go b/kreacher/clients.go index ba4b3c4..607f77a 100755 --- a/kreacher/clients.go +++ b/kreacher/clients.go @@ -1,6 +1,7 @@ package kreacher import ( + "fmt" "time" td "github.com/gotd/td/telegram" @@ -9,10 +10,10 @@ import ( ) var rdb = redis.NewClient(&redis.Options{ - Addr: "localhost:6379", - Password: "", // no password set - DB: 0, // use default DB - Protocol: 3, // specify 2 for RESP 2 or 3 for RESP 3 + Addr: fmt.Sprintf("%s:%d", NewConfig().RedisHost, NewConfig().RedisPort), + Password: NewConfig().RedisPassword, + DB: 0, // use default DB + Protocol: 3, // specify 2 for RESP 2 or 3 for RESP 3 }) var kbot, _ = tele.NewBot(tele.Settings{