A simple markov chain chatbot for twitch.tv
  • Go 98.7%
  • Dockerfile 1.3%
Find a file
notarock-s-renovate[bot] ad0851abbe
Update alpine Docker tag to v3.24.3 (#141)
Co-authored-by: notarock-s-renovate[bot] <265181468+notarock-s-renovate[bot]@users.noreply.github.com>
2026-10-27 20:45:47 -04:00
.github Update actions/checkout action to v7 (#135) 2026-09-22 00:31:40 -04:00
grafana fix(grafana): Calculate message counts with counter increases 2026-09-22 00:40:46 -04:00
pkg Move supervisor into pkg/runner 2026-08-05 18:37:59 -04:00
.dockerignore DockerfilE 2025-03-13 00:01:48 -04:00
.env.example Add base /metrics endpoint for Prometheus via METRICS_PORT 2026-02-27 01:18:42 -05:00
.gitignore Donation toggling by filtering out messages containing Cheermotes (#12) 2025-06-05 08:37:16 -04:00
.tuyauterie.yaml Create .tuyauterie.yaml 2025-06-05 12:27:52 -04:00
AGENTS.md Add agents.md 2026-02-22 14:13:48 -05:00
Dockerfile Update alpine Docker tag to v3.24.3 (#141) 2026-10-27 20:45:47 -04:00
example-channels.yaml Initial config file for channels 2025-05-23 00:40:54 -04:00
go.mod Update module github.com/prometheus/client_golang to v1.25.0 (#138) 2026-10-21 13:51:02 -04:00
go.sum Update module github.com/prometheus/client_golang to v1.25.0 (#138) 2026-10-21 13:51:02 -04:00
LICENSE add MIT LICENSE file 2025-03-26 00:34:21 -04:00
main.go Move supervisor into pkg/runner 2026-08-05 18:37:59 -04:00
README.md docs(readme): Simplify wording and correct setup instructions 2026-09-22 00:40:46 -04:00
renovate.json Configure Renovate (#93) 2026-03-03 16:20:39 -05:00

a_c_a_c, a cheap a_n_i_v clone

Dev time GitHub Tag GitHub contributors GitHub License Tuyauterie

A Twitch chatbot that learns from chat and generates messages using a Markov chain. Similar to BinyotBot and a_n_i_v.

Want it in your chat?

I host an instance of the bot. To request it for your channel, open a hosting request.

Community

Want to request a_c_a_c, need help, want to suggest features, or report bugs? Join my Discord: Discord

Features

  • Learns from chat messages as they arrive.
  • Saves chat history and generated messages to files. No database needed.
  • Supports a different message frequency and ignored-bot list for each channel.
  • Can ignore users copying the bot's messages.
  • Filters generated messages using blocked strings or full messages.
  • Sometimes generates funny responses.

Requirements

  • A Twitch account with an OAuth token.
  • Docker or a release binary.
  • Go 1.25+ if building from source.

Configuration

Use a .env file or environment variables for the bot's settings, and a YAML file for the channels it joins.

Environment variables

For Twitch chat, set BASE_PATH, TWITCH_USER, TWITCH_OAUTH_STRING, CHANNEL_CONFIG, and COUNTDOWN. Set ENV=production to enable sending messages.

Variable Description Example
ENV Only production enables sending messages to chat. production
BASE_PATH Directory for message history: channel.txt, channel-sent.txt, and channel-rejected.txt. ./data
COUNTDOWN Default number of chat messages between responses. Must be an integer, even if every channel has its own frequency. 200
IGNORE_PARROTS Set to true to avoid learning from copies of the bot's messages. true
TWITCH_USER Twitch username used by the bot. a_c_a_c
TWITCH_OAUTH_STRING OAuth token for that account. oauth:123123123123123
PROHIBITED_STRINGS Comma-separated strings to block in generated messages. https://,twitch.tv,@
PROHIBITED_MESSAGES Comma-separated full messages to block. acac
CHANNEL_CONFIG Path to the channel configuration file. ./channels.yaml

Channel configuration

bots lists usernames to ignore in every channel. Each channel can add its own ignored usernames through extra_bots.

frequency sets the number of chat messages between responses. If omitted or set to 0, it uses COUNTDOWN.

bots:
  - "nightbot"
  - "streamelements"

channels:
  - name: "my_favorite_streamer"
    frequency: 200
    extra_bots:
      - "mod_helper"
      - "my_favorite_moderation_bot"
  - name: "streamer_two"

The example configuration also includes allow_bits. That setting currently has no effect because the bits-filtering code is disabled.

Usage

Binary

Download a binary from releases.

Create a data directory and save your channel configuration as channels.yaml. Create a .env file in the directory where you run the bot:

ENV=production
BASE_PATH=./data
COUNTDOWN=200
IGNORE_PARROTS=true
TWITCH_USER=your_bot_account
TWITCH_OAUTH_STRING=oauth:your_token
CHANNEL_CONFIG=./channels.yaml

Then run:

./acac

Use ENV=dev to run without sending messages to chat.

Docker

With the .env, data directory, and channels.yaml from above:

docker run --env-file .env \
  -v "$(pwd)/data:/data" \
  -v "$(pwd)/channels.yaml:/channels.yaml:ro" \
  -e BASE_PATH=/data \
  -e CHANNEL_CONFIG=/channels.yaml \
  ghcr.io/notarock/a_c_a_c:latest

Message history is saved in the mounted data directory.

Before adding the bot

Get the streamer's permission before adding it to a channel, and follow Twitch's Terms of Service.

The bot learns from whatever people say in chat. Expect gibberish and potentially offensive messages.

I am not responsible for whatever it says. Everyone in chat is.

Contributing

Open an issue for bugs or feature requests. For code changes, fork the repository and submit a pull request.

License

MIT License.