A Go package for building Twitch.tv IRC chat bots.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
doc.go
twitchbot.go

README.md

TwitchBot

The twitchbot package provides a set of functions that control a basic Twitch.tv chat bot. The package also exposes an interface which can be used to create a custom chat bot.

Installation

Run go get github.com/foresthoffman/twitchbot

Importing

Import this package by including github.com/foresthoffman/twitchbot in your import block.

e.g.

package main

import(
    ...
    "github.com/foresthoffman/twitchbot"
)

Usage

Basic usage:

package main

import (
	"github.com/foresthoffman/twitchbot"
	"time"
)

func main() {

	// Replace the channel name, bot name, and the path to the private directory with your respective
	// values.
	myBot := twitchbot.BasicBot{
		Channel:     "twitch",
		MsgRate:     time.Duration(20/30) * time.Millisecond,
		Name:        "TwitchBot",
		Port:        "6667",
		PrivatePath: "../private/oauth.json",
		Server:      "irc.chat.twitch.tv",
	}
	myBot.Start()
}

That's all, enjoy!