This commit is contained in:
lyx0 2022-03-06 20:40:00 +01:00
parent 0098d5fb48
commit fab09d68ae
2 changed files with 10 additions and 3 deletions

View file

@ -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)
}
}

View file

@ -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"),
}