A Twitch / Discord bot and SSE client that tracks subreddits going dark during the reddit protests of 2023. This bot listens for chat messages on Twitch streams and provides information about the current status of subreddits. It can also send messages to a Discord webhook.
Also check out https://darktotal.com/ for a real time list of subreddits that have gone dark.
Want to stay up-to-date on Reddit news without spending hours reading through articles? Check out the link below. Tl;dr daily news takes top news articles from around the world and condenses them into easy-to-read summaries.
- SSE client connected to an external SSE server
- Receives subreddit updates and emits events to update the data
- Tracks the number of subreddits that have gone dark or public
- Responds to Twitch chat commands with the status of subreddits
- Sends messages to a Twitch Chat & Discord webhook with subreddit updates
- Node.js
- NPM
- Twitch Account with oauth token
- Discord Webhook
dotenv
: Loads environment variables from a.env
filetmi.js
: Twitch Messaging Interface for building Twitch chat botseventsource
: Client for receiving Server-Sent Events (SSE)axios
: HTTP client for sending Discord Webhook messages
- Clone the repository
- Create a
.env
file in the root directory with the following keys and fill in the appropriate values:
TWITCH_USERNAME=<your_twitch_username>
TWITCH_OAUTH_TOKEN=<your_twitch_oauth_token>
TWITCH_CHANNELS=<comma_separated_list_of_twitch_channels_to_monitor>
SSE_URL=<url_of_sse_server>
DISCORD_WEBHOOK=<discord_webhook_url>
- Install the required dependencies:
npm install
- Run the bot:
npm start
!dark
: Sends a message with the total number of subreddits that have gone dark, the total number of subreddits, and the percentage.!check <subreddit>
: Checks if a subreddit is dark or not and sends a message with the current status.
Example:
!check r/ChatGPT
To enable posting messages to a Discord webhook, set the DISCORD_WEBHOOK
environment variable in the .env
file to a valid webhook URL.
This bot was built for https://reddark.untone.uk/ to help keep the Twitch stream and Discord chat lively.
- https://discord.gg/reddark
- https://github.com/Tanza3D/reddark
- https://github.com/reddark-remix/reddark-remix
Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)
https://creativecommons.org/licenses/by-nc/4.0/
- Share — copy and redistribute the material in any medium or format
- Adapt — remix, transform, and build upon the material
The licensor cannot revoke these freedoms as long as you follow the license terms.
- Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- NonCommercial — You may not use the material for commercial purposes.
- No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.