mirror of
https://github.com/lyx0/nourybot.git
synced 2024-11-13 19:49:55 +01:00
26 lines
468 B
Go
26 lines
468 B
Go
package main
|
|
|
|
import (
|
|
"github.com/gempir/go-twitch-irc/v3"
|
|
"github.com/sirupsen/logrus"
|
|
)
|
|
|
|
func (nb *nourybot) connect() error {
|
|
nb.twitchClient.Join("nourybot")
|
|
|
|
logrus.Info("Connecting to Twitch...")
|
|
err := nb.twitchClient.Connect()
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (nb *nourybot) onConnect() {
|
|
nb.twitchClient.Say("nourybot", "xd")
|
|
}
|
|
|
|
func (nb *nourybot) onPrivateMessage(message twitch.PrivateMessage) {
|
|
logrus.Info(message.Message)
|
|
}
|