diff --git a/cmd/bot/bot.go b/cmd/bot/bot.go index 094bb48..d62cc93 100644 --- a/cmd/bot/bot.go +++ b/cmd/bot/bot.go @@ -28,7 +28,7 @@ func (b *Bot) Connect() error { log.Info("fn Connect") cfg := cfg.LoadConfig() b.twitchClient.OnPrivateMessage(func(message twitch.PrivateMessage) { - handlers.HandleTwitchMessage(message, b.twitchClient, cfg) + handlers.HandlePrivateMessage(message, b.twitchClient, cfg) }) err := b.twitchClient.Connect() diff --git a/pkg/handlers/twitchmessage.go b/pkg/handlers/privatemessage.go similarity index 80% rename from pkg/handlers/twitchmessage.go rename to pkg/handlers/privatemessage.go index 8df6b28..0fdda15 100644 --- a/pkg/handlers/twitchmessage.go +++ b/pkg/handlers/privatemessage.go @@ -7,12 +7,12 @@ import ( log "github.com/sirupsen/logrus" ) -// HandleTwitchMessage takes in a twitch.Privatemessage and -// *twitch.Client and has the logic to decide if the provided +// HandlePrivateMessage takes in a twitch.Privatemessage, +// *twitch.Client and *config.Config and has the logic to decide if the provided // PrivateMessage is a command or not and passes it on accordingly. // Typical twitch message tags https://paste.ivr.fi/nopiradodo.lua -func HandleTwitchMessage(message twitch.PrivateMessage, client *twitch.Client, cfg *config.Config) { - log.Info("fn HandleTwitchMessage") +func HandlePrivateMessage(message twitch.PrivateMessage, client *twitch.Client, cfg *config.Config) { + log.Info("fn HandlePrivateMessage") // log.Info(message) // roomId is the Twitch UserID of the channel the message