rename HandleTwitchMessage to HandlePrivateMessage

This commit is contained in:
lyx0 2021-10-14 01:00:00 +02:00
parent bf0496fc28
commit f6cbefd002
2 changed files with 5 additions and 5 deletions

View file

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

View file

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