This commit is contained in:
lyx0 2021-10-14 20:00:28 +02:00
parent dbaa4ed180
commit b6028eb565

View file

@ -23,7 +23,6 @@ func NewBot(cfg *cfg.Config) *Bot {
return &Bot{
cfg: cfg,
twitchClient: twitchClient,
Uptime: time.Now(),
}
}
@ -31,6 +30,8 @@ func (b *Bot) Connect() error {
log.Info("fn Connect")
cfg := cfg.LoadConfig()
b.Uptime = time.Now()
b.twitchClient.OnPrivateMessage(func(message twitch.PrivateMessage) {
handlers.HandlePrivateMessage(message, b.twitchClient, cfg, b.Uptime)
})