Documentation
¶
Overview ¶
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.
Basic usage:
``` package main
import (
"github.com/Furkan9015/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() }
```
Index ¶
Constants ¶
View Source
const ISTFormat = "Jan 2 15:04:05 IST"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BasicBot ¶
type BasicBot struct { Channel string Credentials *OAuthCred MsgRate time.Duration Name string Port string PrivatePath string Server string // contains filtered or unexported fields }
func (*BasicBot) Disconnect ¶
func (bb *BasicBot) Disconnect()
func (*BasicBot) HandleChat ¶
func (*BasicBot) JoinChannel ¶
func (bb *BasicBot) JoinChannel()
func (*BasicBot) ReadCredentials ¶
Click to show internal directories.
Click to hide internal directories.