Livecoding a Twitchbot at https://twitch.tv/nirespire
Following the tutorial here: https://dev.to/foresthoffman/building-a-twitchtv-chat-bot-with-go---part-1-i3k
- Generate OAuth credentials for twitch IRC authentication
- Copy OAuth token into
oauth.json.template
and rename tooauth.json
- Set appropriate configs in
main.go
chatConfig := types.ChatConfig{
ProjectDescription: "Currently working on a twitch chatbot using GOLANG.",
}
myBot := bot.TwitchBot{
Channel: "your_channel_name(lowercase)",
MsgRate: time.Duration(20/30) * time.Millisecond,
Name: "SomeBotName",
Port: "6667",
PrivatePath: "oauth.json",
Server: "irc.chat.twitch.tv",
ServerPort: ":8080",
ChatConfig: chatConfig,
}
go install
- run
twitchbot