This is a Node.js bot that uses Puppeteer to automatically watch Twitch streams and claim drop rewards.
Use this bot at your own risk! This bot uses parts of the Twitch API that are not intended for public use. I am not responsible for anything that happens to your Twitch account.
- Install Node.js
- Install Google Chrome
- Install this package:
npm install .
- Start the bot with
node src/index.js
There are multiple options you can configure. They can be provided as command line arguments or in a config JSON file. Options passed as command line arguments will override items in the config file. If no command line arguments are provided, a default config file will be generated.
A sample config file looks like this:
{
"browser": "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe",
"games": ["30921", "511224", "488552"],
"headless": true,
"headless_login": false,
"interval": 15,
"browser_args": []
}
Below is a list of all available options.
Argument | Config | Description | Default |
---|---|---|---|
‑‑config <path> |
Path to your configuration file. | config.json |
|
‑‑browser <path> |
browser |
Path to your browser executable. Only Chrome is currently supported. Although Puppeteer includes a version of Chromium, it does not support the video format required to watch Twitch streams, so a separate Chrome installation is required. | System dependent |
‑‑games <ids> |
games |
A list of IDs of the games that the bot should automatically watch. See games.csv for a list of game IDs. This item is optional. If empty or omitted, the bot will try to watch all games. |
[] |
‑‑username <string> |
username |
Your Twitch username. It is only used to automatically fill out the login page. This is required if headless-login is true , otherwise it is optional. |
|
‑‑password <string> |
password |
Your Twitch password. It is only used to automatically fill out the login page. This is required if headless-login is true , otherwise it is optional. |
|
‑‑headless-login |
headless_login |
Login to Twitch in headless mode. If this is enabled, you must also provide a username and password. This is useful for logging in remotely. | false |
‑‑headless <boolean> |
headless |
Toggle headless mode. If false, this will display the browser at all times. Useful for debugging. | true |
‑‑interval <minutes> |
interval |
The number of minutes to wait between checking for new drop campaigns. | 15 |
‑‑browser‑args <args> |
browser_args |
Extra arguments to pass to the browser instance. | [] |