Skip to content

Instantly share code, notes, and snippets.

@ahndmal
Created April 14, 2022 05:54
Show Gist options
  • Save ahndmal/7689a1b2cd4cddeee2707695b8f337b7 to your computer and use it in GitHub Desktop.
Save ahndmal/7689a1b2cd4cddeee2707695b8f337b7 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"github.com/gempir/go-twitch-irc"
)
func main() {
client := twitch.NewClient("BOT", fmt.Sprintf("oauth: %s", oauthToken))
client.OnPrivateMessage(func(message twitch.PrivateMessage) {
fmt.Println(message.Message)
})
client.Join("USER") // join bb channel
err := client.Connect()
if err != nil {
panic(err)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment