diff --git a/cmd/nourybot/nourybot.go b/cmd/nourybot/nourybot.go index 56f03dd..491b1be 100644 --- a/cmd/nourybot/nourybot.go +++ b/cmd/nourybot/nourybot.go @@ -7,10 +7,12 @@ import ( "github.com/lyx0/nourybot/internal/bot" "github.com/lyx0/nourybot/internal/config" "github.com/lyx0/nourybot/internal/db" + "github.com/sirupsen/logrus" ) func main() { cfg := config.LoadConfig() + logrus.Info(cfg.Username, cfg.Oauth) twitchClient := twitch.NewClient(cfg.Username, cfg.Oauth) now := time.Now() @@ -23,5 +25,10 @@ func main() { } nb.TwitchClient.Join("nourybot") - nb.TwitchClient.Connect() + + err := nb.TwitchClient.Connect() + if err != nil { + panic(err) + } + } diff --git a/internal/config/config.go b/internal/config/config.go index 8587620..ac49088 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -22,8 +22,8 @@ func LoadConfig() *Config { } cfg := &Config{ - Username: os.Getenv("TWITCH_USER"), - Oauth: os.Getenv("TWITCH_PASS"), + Username: os.Getenv("BOT_USERNAME"), + Oauth: os.Getenv("BOT_PASS"), BotUserId: os.Getenv("BOT_USER_ID"), MongoURI: os.Getenv("MONGO_URI"), }