Skip to content

AdityaLF/Discord-StreamTracker-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord Stream Tracker Bot

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.

Example


✨ Features

  • 📢 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).

⚙️ Command List

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

🚀 Setup & Installation

Follow the steps below to run this bot on your own server.

1. Prerequisites

2. Create Bot & Get Required Info

Create a Discord Bot Application

  1. Go to the Discord Developer Portal
  2. Click "New Application", give it a name
  3. Navigate to the "Bot" tab, click "Add Bot", then confirm

Obtain Bot Token

  1. Still under the "Bot" tab, click "Reset Token" to get your bot token
  2. Store it securely — Never share it publicly

Enable Privileged Intents

  • Under the "Bot" tab, scroll to "Privileged Gateway Intents"

  • Enable both:

    • PRESENCE INTENT
    • MESSAGE CONTENT INTENT
    • SERVER MEMBERS INTENT

Invite the Bot to Your Server

  1. Go to the "OAuth2" tab, then "URL Generator".

  2. In the "SCOPES" section, check both bot and application.commands.

  3. In the "BOT PERMISSIONS" section that appears, check the following permissions:

    • Send Messages

    • Embed Links

  4. Copy the generated URL at the bottom and open it in your browser to invite the bot to your server.

3. Clone the Repository

Open your terminal:

git clone https://github.com/AdityaLF/Discord-StreamTracker-Bot.git
cd Discord-StreamTracker-Bot

4. Install Dependencies

Navigate into the project folder in your terminal and install the required libraries.

pip install -r requirements.txt

5. Set Up Your Environment File (.env)

Your secret bot token is stored in a .env file. A template file (.env.example) is provided to guide you.

  1. Open the template file, .env.example
  2. Fill it out by replacing bot_token_here with your actual bot token.
  3. Save your changes, then rename the file from .env.example to .env

6. Run the Bot

After saving your changes and ensuring dependencies are installed, run the bot with:

python bot.py

👤 Author


📄 License

This project is licensed under the MIT License.

About

A bot that sends a message to a server channel whenever a member starts streaming.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages