Larke 5af5714e2f | 1 year ago | |
---|---|---|
examples | 2 years ago | |
.gitignore | 2 years ago | |
LICENSE | 2 years ago | |
README.md | 1 year ago | |
bot.go | 2 years ago | |
builder.go | 2 years ago | |
client.go | 2 years ago | |
go.mod | 2 years ago | |
parser.go | 2 years ago |
Go Twitch Bot Api wrapper, with an easy to use interface.
package main
import (
"github.com/witer33/twitchbot"
)
func main() {
bot := twitchbot.NewBot("oauth:abcdef", "mybot", []string{"channel"})
bot.OnMessage(func(bot *twitchbot.Bot, message *twitchbot.Message) {
if message.Message == "!ping" {
message.Reply("pong")
message.Delete()
}
})
bot.Run()
}