A multifunctional Discord bot designed to monitor, announce, and record the stream activity history of your server members in real-time. Built with Python using the py-cord
library.
- 📢 Real-time Notifications: Automatically sends an announcement to a specific channel when a member starts streaming on Twitch or YouTube.
- 📜 Streaming History: Every completed stream session is automatically logged, saving user info, platform, title, start time, and duration.
- 🔴 Active Streamer List: Easily see who is currently live in the server with a simple command.
- ⚙️ Per-Server Configuration: The notification channel can be set specifically for each server.
- 🎨 Platform-Specific Details: The notification intelligently distinguishes between Twitch streams (purple color) and YouTube streams (red color).
Here is a list of available commands:
Command | Description | Access |
---|---|---|
/set_channel |
Sets the channel to receive stream notifications. | Admin Only |
/liststream |
Displays a list of all members who are currently streaming. | All Members |
/history |
Shows the 10 most recent stream histories (server-wide or for a specific user). | All Members |
/help |
Displays all commands. | All Members |
Follow the steps below to run this bot on your own server.
- Python 3.8+ — Download here
- Go to the Discord Developer Portal
- Click "New Application", give it a name
- Navigate to the "Bot" tab, click "Add Bot", then confirm
- Still under the "Bot" tab, click "Reset Token" to get your bot token
- Store it securely — Never share it publicly
-
Under the "Bot" tab, scroll to "Privileged Gateway Intents"
-
Enable both:
- PRESENCE INTENT
- MESSAGE CONTENT INTENT
- SERVER MEMBERS INTENT
-
Go to the "OAuth2" tab, then "URL Generator".
-
In the "SCOPES" section, check both bot and application.commands.
-
In the "BOT PERMISSIONS" section that appears, check the following permissions:
-
Send Messages
-
Embed Links
-
-
Copy the generated URL at the bottom and open it in your browser to invite the bot to your server.
Open your terminal:
git clone https://github.com/AdityaLF/Discord-StreamTracker-Bot.git
cd Discord-StreamTracker-Bot
Navigate into the project folder in your terminal and install the required libraries.
pip install -r requirements.txt
Your secret bot token is stored in a .env
file. A template file (.env.example
) is provided to guide you.
- Open the template file,
.env.example
- Fill it out by replacing
bot_token_here
with your actual bot token. - Save your changes, then rename the file from
.env.example
to.env
After saving your changes and ensuring dependencies are installed, run the bot with:
python bot.py
- GitHub: @AdityaLF
- Discord: @05.07am
- Support Me: ko-fi.com/adityaf
This project is licensed under the MIT License.