mirror of
https://github.com/lyx0/nourybot.git
synced 2024-11-13 19:49:55 +01:00
rename HandleTwitchMessage to HandlePrivateMessage
This commit is contained in:
parent
bf0496fc28
commit
f6cbefd002
2 changed files with 5 additions and 5 deletions
|
@ -28,7 +28,7 @@ func (b *Bot) Connect() error {
|
||||||
log.Info("fn Connect")
|
log.Info("fn Connect")
|
||||||
cfg := cfg.LoadConfig()
|
cfg := cfg.LoadConfig()
|
||||||
b.twitchClient.OnPrivateMessage(func(message twitch.PrivateMessage) {
|
b.twitchClient.OnPrivateMessage(func(message twitch.PrivateMessage) {
|
||||||
handlers.HandleTwitchMessage(message, b.twitchClient, cfg)
|
handlers.HandlePrivateMessage(message, b.twitchClient, cfg)
|
||||||
})
|
})
|
||||||
|
|
||||||
err := b.twitchClient.Connect()
|
err := b.twitchClient.Connect()
|
||||||
|
|
|
@ -7,12 +7,12 @@ import (
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
// HandleTwitchMessage takes in a twitch.Privatemessage and
|
// HandlePrivateMessage takes in a twitch.Privatemessage,
|
||||||
// *twitch.Client and has the logic to decide if the provided
|
// *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.
|
// PrivateMessage is a command or not and passes it on accordingly.
|
||||||
// Typical twitch message tags https://paste.ivr.fi/nopiradodo.lua
|
// Typical twitch message tags https://paste.ivr.fi/nopiradodo.lua
|
||||||
func HandleTwitchMessage(message twitch.PrivateMessage, client *twitch.Client, cfg *config.Config) {
|
func HandlePrivateMessage(message twitch.PrivateMessage, client *twitch.Client, cfg *config.Config) {
|
||||||
log.Info("fn HandleTwitchMessage")
|
log.Info("fn HandlePrivateMessage")
|
||||||
// log.Info(message)
|
// log.Info(message)
|
||||||
|
|
||||||
// roomId is the Twitch UserID of the channel the message
|
// roomId is the Twitch UserID of the channel the message
|
Loading…
Reference in a new issue