Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/foresthoffman/bot
A Go package for building Twitch.tv IRC chat bots. Previously "twitchbot".
https://github.com/foresthoffman/bot
bot go golang irc twitch
Last synced: about 1 month ago
JSON representation
A Go package for building Twitch.tv IRC chat bots. Previously "twitchbot".
- Host: GitHub
- URL: https://github.com/foresthoffman/bot
- Owner: foresthoffman
- License: mit
- Created: 2017-12-19T04:01:19.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-05-27T19:57:57.000Z (over 3 years ago)
- Last Synced: 2024-06-20T13:33:56.967Z (7 months ago)
- Topics: bot, go, golang, irc, twitch
- Language: Go
- Homepage:
- Size: 15.6 KB
- Stars: 22
- Watchers: 3
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## 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. See the following series for a step-by-step tutorial on [Building a Twitch.tv Chat Bot](https://dev.to/foresthoffman/building-a-twitchtv-chat-bot-with-go---part-1-i3k) with this package.
### Installation
Run `go get github.com/foresthoffman/bot`
### Importing
Import this package by including `github.com/foresthoffman/bot` in your import block.
e.g.
```go
package mainimport(
...
"github.com/foresthoffman/bot"
)
```### Usage
Basic usage:
```go
package mainimport (
"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!_