#twitch #irc #regex #chat #bot

app twitch-hunter

A simple tool that looks for specific regex patterns in Twitch chat messages

6 releases

new 0.4.3 Jan 13, 2025
0.4.2 Jan 13, 2025
0.3.0 Jan 12, 2025
0.2.0 Jan 12, 2025

#227 in Network programming

Download history 323/week @ 2025-01-08

323 downloads per month

MIT license

19KB
432 lines

Twitch Hunter

Twitch Hunter is a tool that connects to multiple Twitch IRC channels and looks for specific regex patterns in chat messages. It uses the Twitch Helix API to fetch streams from a specific category and then monitors the chat messages in those streams.

Features

  • Connects to multiple Twitch IRC channels.
  • Filters chat messages based on a regex pattern.
  • Uses the Twitch Helix API to fetch streams from a specific category.

Installation

Using cargo:

  cargo install twitch-hunter

Or build from source:

  1. Clone the repository:
  git clone https://github.com/ayoubdya/twitch-hunter.git
  cd twitch-hunter
  1. Install dependencies:
  cargo build --release

Examples

  twitch-hunter --client-id <CLIENT_ID> --access-token <ACCESS_TOKEN> --save --category-name "Rust" --filter "https://.+"
  twitch-hunter --streams xqc,loltyler1 --filter 'KEKW'

Usage

Run the application:

Usage: twitch-hunter [OPTIONS] --filter <REGEX> <--category-name <CATEGORY_NAME>|--streams <STREAM1,STREAM2 ...>>

Options:
      --client-id <CLIENT_ID>
      --access-token <ACCESS_TOKEN>
  -c, --category-name <CATEGORY_NAME>
  -s, --streams <STREAM1,STREAM2 ...>
  -b, --batch-size <BATCH_SIZE>        [default: 100]
  -f, --filter <REGEX>
      --save                           Save credentials to file
  -h, --help                           Print help
  -V, --version                        Print version

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

Authors

Dependencies

~14–27MB
~377K SLoC