Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

README.md

Bot

The bot 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/bot

Importing

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

e.g.

package main

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

Usage

Basic usage:

package main

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

func main() {

	// Replace the channel name, bot name, and the path to the private directory with your respective
	// values.
	myBot := bot.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!

About

A Go package for building Twitch.tv IRC chat bots. Previously "twitchbot".

Resources

License

Packages

No packages published

Languages