A modular Twitch bot made in Go
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
395 B

2 years ago
2 years ago
  1. # twitchbot
  2. Go Twitch Bot Api wrapper, with an easy to use interface.
  3. # Example
  4. ```go
  5. package main
  6. import (
  7. "twitch/twitchbot"
  8. )
  9. func main() {
  10. bot := twitchbot.NewBot("oauth:abcdef", "mybot", []string{"channel"})
  11. bot.OnMessage(func(bot *twitchbot.Bot, message *twitchbot.Message) {
  12. if message.Message == "!ping" {
  13. message.Reply("pong")
  14. message.Delete()
  15. }
  16. })
  17. bot.Run()
  18. }
  19. ```