A Discord bot that automatically detects and converts social media links into embeddable formats with multiple options. The bot supports Twitter/X, Instagram, Threads, YouTube, Reddit, and TikTok links, providing users with various embed format choices.
This repository includes a standalone documentation site as index.html (configuration, architecture, security, workflows, Ctrl+K search, and in-page highlighting). Open it in a browser locally or host it with GitHub Pages.
| How to view | |
|---|---|
| Locally | After cloning, open index.html in Chrome, Edge, or Firefox (double-click or drag the file into a window). |
| On GitHub | From the repo file list, open index.html. GitHub shows the source; for the interactive UI, clone/download and open locally, or use GitHub Pages (below). |
| GitHub Pages (optional) | Repo Settings → Pages: source = default branch, folder / (root). The site loads index.html automatically. Base URL: https://relishablez.github.io/discord_SocialsEmbedder (or .../index.html). |
-
Multi-Platform Support: Automatically detects and processes links from:
- Twitter/X
- Threads
- YouTube
- TikTok
-
Smart Embed Options: Each platform offers multiple embed format choices
-
Auto-Embed Suppression: Automatically removes Discord's default embeds from original messages
-
Reaction-Based Feedback: Users can react with ✅ or ❌ to indicate if the embed worked
-
Mention-Safe Preview Flow: Intermediate bot preview messages neutralize mentions (shown as code-style
@name) to avoid duplicate pings -
Link Anti-Spam Cooldown: Rapid repeated link drops by the same user trigger a short cooldown
-
Owner Commands: Server management and invite generation features
-
Slash Commands: Modern Discord slash command support
- All Contents embed
- Text-only embed
- Video-only embed
- Gallery embed (Author + Media without captions)
- KK Instagram (Media Only)
- UU Instagram (Media + Info)
- FixThreads embed
- Long Form Link (koutube.com)
- Short Form Link (koutu.be)
- rxddit.com
- old.rxddit.com
- Direct High-Quality Video Source (when available)
- Regular Embed (tnktok.com)
- Direct Embed (d.tnktok.com - no stats clutter)
- Embed with Description (a.tnktok.com - description at top)
- Python 3.8 or higher
- Discord Bot Token
- Discord Bot with required permissions (see below)
-
Clone or download this repository
-
Install required dependencies:
pip install -r requirements.txt
-
Create a
.envfile in the bot directory (see.env.examplefor a template):DISCORD_TOKEN=your_bot_token_here BOT_OWNER_ID=your_discord_user_id_here BEDBOT_CONTROL_TRUSTED_IDS=111111111,222222222BEDBOT_CONTROL_TRUSTED_IDSis only needed if you runbedbotControl.py(comma‑separated user IDs, no spaces). -
Optional —
private_config.py: only if you want Python-side fallbacks. Precedence:.envwins for the token and forBEDBOT_CONTROL_TRUSTED_IDS;.envwins forBOT_OWNER_IDunless it’s missing or0, thenprivate_configis used. Copy fromprivate_config.example.py. -
Run the bot:
python sizzbedbot_V1.py
- Safe to upload:
sizzbedbot_V1.pyhas no embedded token or owner ID. - Never commit:
.env,private_config.py, or any file with real tokens/IDs. - If a bot token was ever pasted in chat, a ticket, or an old commit, reset the token in the Developer Portal and update
.env/private_config.py.
- Uses the same
DISCORD_TOKENrules as the main bot (.envfirst, then optionalprivate_config.py). - Set who may run
/start,/restart,/shutdownwithBEDBOT_CONTROL_TRUSTED_IDSin.env(comma‑separated). Optional fallback: list inprivate_config.py.
The bot requires the following permissions:
- ✅ Send Messages
- ✅ Use Slash Commands
- ✅ Add Reactions
- ✅ Read Message History
- ✅ Embed Links
- ✅ Read Messages/View Channels
- ✅ Send Messages in Threads
- ✅ Manage Messages (to suppress embeds on original messages)
- ✅ Attach Files (for Reddit video downloads)
Permission Integer (combined, excluding “Mention Everyone”): 277025516608 (or use individual permissions above)
Enable the following intents in the Discord Developer Portal:
- ✅ Message Content Intent (Privileged)
- ✅ Server Members Intent (if needed for server info)
Simply post a link from any supported platform in a channel where the bot has access. The bot will:
- Suppress the original message's auto-embed
- Send a message with embed format options
- Wait for your reaction to select a format
- Send the embedded link
- Allow you to react with ✅ (worked) or ❌ (failed) for feedback
/ping- Check bot latency and status/help- Open 3-page help (embeds, management, commands)@bot ping- Check bot latency (mention-based)@bot help- Show 3-page help in the channel (mention-based)/info- Show info about the current server (for non-owners)@bot info- Show info about the current server (mention-based, redacted to current server only)/invitestatus- Check invite generation status for the current server@bot invitestatus- Check invite status (mention-based, current server only)
/sync- Force sync slash commands for the server (Admin only)@bot sync- Force sync slash commands (mention-based, Admin only)@bot join- Generate an invite link for the current server (Admin or Bot Owner)
-
/info- Get server information (Bot Owner only, full details)- Usage:
/info- Shows paginated server list with per-server actions - Usage:
/info user <user_id>- Find servers owned by a user - Usage:
/info server <server_id>- Get info for a specific server
- Usage:
-
/join- Open an interactive menu to generate invites for any server the bot is in (Bot Owner only) -
/enableinvites- Enable invite generation for current server (Bot Owner only) -
/disableinvites- Disable invite generation for current server (Bot Owner only) -
/invites- Show a detailed list of active invites created by the bot (Bot Owner only) -
@bot invites- Show a redacted list of active invites in the current channel (Bot Owner only)
Note: Owner commands can also be used via mentions where applicable: @bot info, @bot join, @bot invites, etc.
- Link Detection: The bot monitors all messages for links matching supported platforms
- Embed Suppression: When a link is detected, the bot suppresses Discord's default embed on the original message
- Format Selection: The bot sends a message with reaction options for different embed formats
- Embed Generation: After selecting a format, the bot sends the converted link
- Feedback System: Users can react with ✅ (embed worked) or ❌ (embed failed) on the embedded message
- ✅: Reposts the final converted message (real mentions preserved only at final step)
- ❌: Reposts the final original message + failed note (real mentions preserved only at final step)
- In the intermediate "You selected..." preview message, user/role mentions and
@everyone/@hereare converted to safe code-style text so they do not ping. - In the final repost (after ✅ or ❌), the bot keeps the original mention text behavior so the message matches what the user actually wrote.
- If a user posts too many supported links quickly, the bot applies a short cooldown before processing more links from that user.
- This cooldown is separate from management-command rate limits (
/info,/join, etc.).
Create a .env file with (see .env.example):
DISCORD_TOKEN=your_bot_token_here
BOT_OWNER_ID=your_discord_user_id_here
BEDBOT_CONTROL_TRUSTED_IDS=111111111,222222222
(Omit BEDBOT_CONTROL_TRUSTED_IDS if you don’t use bedbotControl.py.)
Prefer BOT_OWNER_ID in .env. Optional fallback: gitignored private_config.py (see step 4).
To find your Discord User ID:
- Enable Developer Mode in Discord (User Settings → Advanced → Developer Mode)
- Right-click on your profile → Copy ID
bot_twitterEmbeds/
├── sizzbedbot_V1.py # Main bot file (safe to share if secrets stay out)
├── index.html # Interactive HTML docs (open in browser; GitHub Pages default page)
├── private_config.example.py # Optional local overrides (see README)
├── .env.example # Template for `.env` (safe to commit)
├── keep_alive.py # Keep-alive script (for hosting services)
├── requirements.txt # Python dependencies
├── .env # Environment variables (create this; gitignored)
└── README.md # This file
- Check that the bot has "Read Messages" and "Send Messages" permissions
- Verify "Message Content Intent" is enabled in Discord Developer Portal
- Ensure the bot is online and not rate-limited
- Use
/synccommand (Admin only) to force sync commands - Wait a few minutes for global command sync (can take up to 1 hour)
- Check that the bot has "Use Slash Commands" permission
- Ensure the bot has "Manage Messages" permission
- Check that the bot's role is above the message author's role (if applicable)
- The bot attempts to fetch the highest quality video URL
- Some Reddit posts may not have direct video links available
- Try using the rxddit.com or old.rxddit.com options instead
The bot includes a keep_alive.py file for use with hosting services like Replit or similar platforms. The bot will automatically call keep_alive() when started.
For production hosting, consider:
- VPS: DigitalOcean, Linode, AWS EC2
- Cloud Platforms: Railway, Render, Heroku
- Dedicated Hosting: Vultr, Contabo
For issues or questions:
- Check the troubleshooting section above
- Verify all permissions and intents are correctly configured
- Check bot logs for error messages
This bot is provided as-is for personal use.
Created by Sizzle1337
Note: Make sure to keep your .env file secure and never commit it to version control. Add .env to your .gitignore file.