A comprehensive Discord bot that monitors live streams across multiple platforms and sends notifications when your favorite streamers go live.
- Multi-Platform Support: Monitor streams on YouTube, Twitch, TikTok, and Kick
- Real-time Notifications: Get instant Discord notifications when streamers go live
- Robust Detection: Advanced web scraping and API integration for reliable stream detection
- Anti-Rate Limiting: Built-in delays and fallback methods to avoid platform restrictions
- Easy Management: Simple slash commands to add, remove, and list monitored streamers
- Persistent Storage: Automatically saves your monitored streamers between bot restarts
| Platform | Status | Method | Notes |
|---|---|---|---|
| YouTube | โ Full Support | Official API | Requires API key |
| Twitch | โ Full Support | Official API | Requires Client ID & Secret |
| TikTok | โ Full Support | Web Scraping | No API key needed |
| Kick | โ Full Support | API + Web Scraping | Dual fallback method |
- Node.js 16.0.0 or higher
- Discord Bot Token
- Discord Application Client ID
- Discord Webhook URL (for notifications)
- YouTube Data API v3 Key
- Twitch Client ID & Client Secret
-
Clone the repository
git clone https://github.com/yourusername/discord-stream-monitor-bot.git cd discord-stream-monitor-bot -
Install dependencies
npm install
-
Create environment file
cp .env.example .env
-
Configure your environment variables (see Configuration section below)
-
Start the bot
npm start
Create a .env file in the root directory with the following variables:
# Required Discord Configuration
DISCORD_TOKEN=your_discord_bot_token_here
DISCORD_CLIENT_ID=your_discord_client_id_here
WEBHOOK_URL=your_discord_webhook_url_here
# Optional API Keys (for enhanced functionality)
YOUTUBE_API_KEY=your_youtube_api_key_here
TWITCH_CLIENT_ID=your_twitch_client_id_here
TWITCH_CLIENT_SECRET=your_twitch_client_secret_here- Go to Discord Developer Portal
- Create a new application
- Go to "Bot" section and create a bot
- Copy the bot token for
DISCORD_TOKEN - Copy the application ID for
DISCORD_CLIENT_ID - Create a webhook in your Discord channel for
WEBHOOK_URL
- Go to Google Cloud Console
- Create a new project or select existing
- Enable YouTube Data API v3
- Create credentials (API key)
- Copy the API key for
YOUTUBE_API_KEY
- Go to Twitch Developer Console
- Create a new application
- Copy Client ID for
TWITCH_CLIENT_ID - Generate a new secret for
TWITCH_CLIENT_SECRET
The bot uses Discord slash commands for easy interaction:
Add a user to the monitoring list
- platform: Choose from YouTube, Twitch, TikTok, or Kick
- username: The username/channel to monitor
- display_name: (Optional) Custom display name for notifications
Examples:
/track platform:YouTube username:@MrBeast display_name:MrBeast
/track platform:Twitch username:ninja
/track platform:TikTok username:charlidamelio
/track platform:Kick username:trainwreckstv
Remove a user from the monitoring list
- platform: The platform to remove from
- username: The username to remove
Example:
/remove platform:Twitch username:ninja
Display all currently monitored users with their live status
Check if the bot is online and responsive
# Add a YouTube channel
/track platform:YouTube username:UC-lHJZR3Gqxm24_Vd_AJ5Yw display_name:PewDiePie
# Add a Twitch streamer
/track platform:Twitch username:shroud
# Add a TikTok user
/track platform:TikTok username:khaby.lame
# Add a Kick streamer
/track platform:Kick username:trainwreckstv# View all monitored streamers
/list
# Remove a streamer
/remove platform:YouTube username:UC-lHJZR3Gqxm24_Vd_AJ5Yw
# Check bot status
/ping- Monitoring Loop: The bot checks all monitored streamers every 5 minutes
- Platform Detection: Uses appropriate method for each platform:
- YouTube: Official API with channel resolution
- Twitch: Official Helix API
- TikTok: Advanced web scraping with multiple detection methods
- Kick: API with web scraping fallback for 403 errors
- Notifications: Sends rich embed notifications via Discord webhook when streamers go live
- Data Persistence: Stores monitored users in
monitored_users.json
- Ensure
DISCORD_TOKENandDISCORD_CLIENT_IDare set in your.envfile - Check that your
.envfile is in the root directory
- Add your YouTube API key to the
.envfile - Verify the YouTube Data API v3 is enabled in Google Cloud Console
- This is normal - the bot will automatically fall back to web scraping
- The bot includes built-in rate limiting to minimize 403 errors
- These platforms may change their structure frequently
- The bot uses multiple detection methods to maintain reliability
- Some users may not be detectable if their profiles are private
Ensure your Discord bot has the following permissions:
Send MessagesUse Slash CommandsEmbed LinksRead Message History
- Check Interval: 5 minutes (configurable in
CONFIG.CHECK_INTERVAL) - Kick Rate Limiting: 3 seconds between requests
- API Timeouts: 10-15 seconds per request
- Support for more platforms (Rumble, Dailymotion, etc.)
- Custom notification messages
- Role mentions for specific streamers
- Stream category/game detection
- Historical stream data
- Web dashboard for management
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
This bot uses web scraping for some platforms (TikTok, Kick) where official APIs are not available. Web scraping may be affected by platform changes and should be used responsibly. Always comply with each platform's terms of service.
If you encounter any issues or have questions:
- Check the troubleshooting section above
- Review the console logs for error messages
- Create an issue on GitHub with detailed information
- Include your environment (Node.js version, OS, etc.)
Made with โค๏ธ for the streaming community