A Discord bot built with D++ that downloads and injects media content from popular social platforms directly into your Discord server. Powered by Cobalt API for reliable media extraction.
- 🎥 Download videos and media from multiple platforms:
- Instagram (posts, reels, IGTV)
- TikTok (videos and short links)
- Facebook (videos, reels, watch links)
- 📤 Automatic upload to Discord channels
- ⚡ Fast processing with real-time status updates
- 🗑️ Automatic cleanup of temporary files
- 🏗️ Modular architecture with separation of concerns
- Visual Studio 2022 (with C++ development tools)
- Windows 10 (x64 or x86)
- Cobalt API Instance (self-hosted or remote)
- Discord Bot Token from Discord Developer Portal
git clone https://github.com/LucasErrNotFound/clipject.git
cd clipjectFollow the Cobalt self-hosting guide to run your own instance.
Quick setup with Docker:
docker run -p 9000:9000 ghcr.io/imputnet/cobalt:latestOr configure .env file:
API_URL="http://localhost:9000/"
API_PORT=9000Open src/Config.cpp and update:
const std::string BOT_TOKEN = "YOUR_DISCORD_BOT_TOKEN_HERE";
const std::string COBALT_API = "http://localhost:9000/"; // Your Cobalt instance URL
const bool KEEP_DOWNLOADED_FILES = false; // Set to true to keep downloaded files
const std::string DOWNLOAD_DIR = "./downloads/"; // Download directory- Open
MyBot.slnin Visual Studio 2022 - Select your configuration (Debug/Release, x64/x86)
- Press
F7or Build → Build Solution - The executable will be in
x64/Debug/orx64/Release/
- Run the compiled executable
- Wait for the "Bot is ready!" message
- Invite the bot to your Discord server with the appropriate permissions
Downloads and posts media from social platforms.
Parameters:
link(required) - URL from Instagram, TikTok, or Facebook
Example:
/inject link: https://www.instagram.com/reel/ABC123/
/inject link: https://www.tiktok.com/@user/video/1234567890
/inject link: https://www.facebook.com/share/r/ABC123/
Response Flow:
- 🔍 Validating link...
- 📥 Downloading media from API...
- 💾 Downloading file...
- 📤 Uploading to Discord...
- ✅ Media injected successfully!
| Platform | Supported Formats |
|---|---|
| Posts, Reels, IGTV | |
| TikTok | Videos, Short links (vm.tiktok.com, vt.tiktok.com) |
| Videos, Reels, Watch, Share links | |
| YouTube |
- D++ (DPP) - Discord API library
- libcurl - HTTP client for API requests and downloads
- JsonCpp - JSON parsing
- Cobalt API - Media extraction service
- Ensure Cobalt API is running and accessible
- Check
COBALT_APIURL in Config.cpp - Verify network connectivity
- Confirm the URL matches supported format
- Check regex patterns in
LinkValidator.cpp
- Cobalt API may not support the specific content
- Platform may have restrictions
- Check Cobalt API logs
- Verify bot token is correct
- Check bot has necessary Discord permissions
- Ensure slash commands are registered (wait ~1 hour after first run)
applications.commands- Use slash commandsbot- Basic bot functionality- Send Messages
- Attach Files
- Use Slash Commands
Bot Invite URL:
https://discord.com/api/oauth2/authorize?client_id=YOUR_CLIENT_ID&permissions=274878024768&scope=bot%20applications.commands
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).
This means:
- ✅ You can use, modify, and distribute this software
- ✅ You must disclose the source code of any modifications
- ✅ You must license derivative works under AGPL-3.0
- ✅ If you run a modified version on a server, you must make the source available to users
See the LICENSE file for full details, or visit https://www.gnu.org/licenses/agpl-3.0.en.html
Note: This project is based on the D++ Windows Bot Template which was originally licensed under Apache 2.0. The modifications and additions in this project are licensed under AGPL-3.0.
- D++ Discord Library by brainboxdotcc
- Cobalt API by imputnet