witer33 918d3394ff | 2 years ago | |
---|---|---|
twitchbot | 2 years ago | |
.gitignore | 2 years ago | |
LICENSE | 2 years ago | |
README.md | 2 years ago | |
go.mod | 2 years ago | |
test.go | 2 years ago |
Go Twitch Bot Api wrapper, with an easy to use interface.
package main
import (
"twitch/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()
}