From 79f8f34066337456e181fde33038c3e2c00aa5d6 Mon Sep 17 00:00:00 2001 From: lyx0 Date: Thu, 14 Oct 2021 20:17:46 +0200 Subject: [PATCH] remove unnecessary second config call --- cmd/bot/bot.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/bot/bot.go b/cmd/bot/bot.go index 8d64915..5845575 100644 --- a/cmd/bot/bot.go +++ b/cmd/bot/bot.go @@ -28,12 +28,11 @@ func NewBot(cfg *cfg.Config) *Bot { 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) + handlers.HandlePrivateMessage(message, b.twitchClient, b.cfg, b.Uptime) }) b.twitchClient.OnWhisperMessage(func(message twitch.WhisperMessage) {