witer33 090371dbd7 | 2 years ago | |
---|---|---|
examples | 2 years ago | |
.gitignore | 2 years ago | |
LICENSE | 2 years ago | |
README.md | 2 years 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()
}