diff --git a/cmd/bot/bot.go b/cmd/bot/bot.go index 39fd54a..8d64915 100644 --- a/cmd/bot/bot.go +++ b/cmd/bot/bot.go @@ -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) })