A modular, $0-cost Discord bot that makes links safer, smarter, and more fun... with a Legend of Zelda theme?
In a society built around obfuscation and tracking, LinkBot helps make Discord servers just a bit more safe, private, and enjoyable without being intrusive.
| 🛡️ Safety | 📋 Link Enrichment | ⚙️ Server Management | 🎮 Fun |
|---|---|---|---|
| Phishing detection (SinkingYachts) | YouTube/Twitch info embeds | Per-server JSON config | Zelda Easter eggs |
| VirusTotal scanning (70+ engines) | Steam game deals & pricing | Domain blacklist/whitelist | Keyword reactions |
| Suspicious TLD detection (.tk, .xyz, etc.) | Amazon product previews | Rate limiting & spam protection | Pot smashing animations |
| HTTP downgrade warnings | IMDb movie details | Duplicate link detection | Cucco swarm reactions |
| Domain age check (RDAP) | Wikipedia summaries | Trusted role bypass | Triforce reactions |
| Executable file danger alerts | GitHub repo/code previews | Notification & audit channels | Rare item drops |
| Redirect chain inspection | Music link aggregation (Odesli) | Command cooldowns | 5% Song chance |
| Safety score card (0-10) | Wayback Machine archiving | NSFW content warnings | |
| URL unshortening | Academic papers (DOI, arXiv) | Manager role delegation | |
| npm / PyPI package info | Disabled/opt-in channels | ||
| Stack Overflow question previews | |||
| Hacker News, Dev.to, Bluesky |
| Command | Description |
|---|---|
/scan <url> |
Full safety scan with VirusTotal |
/safety <url> |
Quick safety score check |
/unshorten <url> |
Expand shortened URLs (show all hops) |
/archive <url> |
Submit to Wayback Machine |
/whois <domain> |
Domain registration lookup (configurable) |
/stats |
Global bot usage statistics |
/help |
Feature overview & command list |
/config show |
View current server settings |
| Command | Description |
|---|---|
/setup |
Interactive setup wizard |
/config toggle <feature> |
Enable/disable any feature |
/config threshold <1-10> |
Set safety alert sensitivity |
/config notify set #channel |
Set mod notification channel |
/config log set #channel |
Set audit log channel |
/config manager add @role |
Delegate management to a role |
/blacklist add/remove/list <domain> |
Block unwanted domains |
/whitelist add/remove/list <domain> |
Allow-only mode |
/trusted add/remove/list @role |
Safety bypass roles |
LinkBot detects links from these platforms and replaces them with embed-friendly proxies, then reposts via webhook - perfectly impersonating the original author:
| Platform | Proxy | Notes |
|---|---|---|
| Twitter / X | fixupx.com |
Supports .translate.spanish suffix |
| TikTok | tnktok.com |
|
uuinstagram.com |
Backup: gginstagram.com, d.vxinstagram.com |
|
rxddit.com |
||
| Pixiv | phixiv.net |
Supports .translate.japanese suffix |
| Bluesky | bskyx.app |
|
| Threads | vxthreads.net |
YouTube Shorts are automatically converted to regular youtube.com/watch?v= URLs.
Every message runs through this pipeline:
Channel Filter → Rate Limiting → Duplicate Check → Trusted Bypass
→ Blacklist/Whitelist → Unshorten → Phishing Check → File Inspection
→ Suspicious TLD → HTTP Downgrade → Domain Age → VirusTotal
→ Safety Score Card → Enrichment → Tracking Strip → NSFW → Easter Eggs
→ Embed Fixer (webhook repost, delete original)
- Python 3.10+
- Discord bot token with Message Content Intent enabled
- (Optional) VirusTotal API key (free, 500 req/day)
- (Optional) OMDb API key (free, 1000/day)
git clone https://github.com/vegalyraevt/LinkBot.git
cd LinkBot
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env
# Edit .env with your DISCORD_BOT_TOKEN
python main.pyBot Permissions Required: Read Messages, Send Messages, Manage Messages, Manage Webhooks, Read Message History, Timeout Members (optional)
linkbot/
├── main.py # Discord Bot + 15-stage message router
├── commands.py # 12 slash command definitions
├── moderation.py # Rate limiting, duplicates, logging, cooldowns
├── config_manager.py # Per-server JSON config (config/{id}.json)
├── permissions.py # RBAC (owner / Manage Server / manager roles)
├── stats.py # Global usage tracker (stats.json)
├── blacklist.py # Domain blacklist/whitelist enforcement
├── channel_filter.py # Channel allow/deny/command restriction
├── embeds.py # Link fixer, tracking stripper, NSFW detection
├── easter_eggs.py # Zelda responses, reactions, rare drops
├── safety/
│ ├── __init__.py # 7 safety check functions
│ ├── rdap.py # Domain age lookup (free RDAP)
│ ├── virustotal.py # VirusTotal API integration
│ └── scorecard.py # 0-10 composite safety scoring
├── enrichment/
│ ├── __init__.py # Router + music + Wikipedia + Discord quotes
│ ├── github.py # GitHub blob/repo/user previews
│ ├── storefronts.py # Steam, Amazon, IMDb
│ ├── multimedia.py # YouTube, Twitch (oEmbed)
│ ├── academic.py # DOI, arXiv, npm, PyPI, Stack Overflow, Gist
│ ├── social.py # Hacker News, Dev.to, Bluesky
│ └── archive.py # Wayback Machine auto-snapshot
├── config/
│ └── defaults.json # Global defaults (30+ settings)
├── requirements.txt
├── README.md
├── CONTRIBUTING.md
└── SECURITY.md
The bot includes hidden Legend of Zelda references that trigger automatically, adding charm without interrupting normal conversations:
Mention the bot with @LinkBot for one of:
- 55% chance: Iconic quotes from Zelda games, the 1989 cartoon, and CD-i spin-offs
- 35% chance: A random image from the
images/folder - 10% chance: A random sound from the
sounds/folder - 5% chance (on top): Special Youtube Video!
Setting up media responses: Create two folders in the bot root directory:
images/(accepts .png, .jpg, .jpeg, .gif) andsounds/(accepts .mp3, .wav, .ogg). These folders are gitignored. The bot picks randomly from whatever you place there. No files = text responses only.
Keywords like pot, smash, vase, burglary, loot, destroy trigger custom Link + Pot emoji reactions.
Keywords like cucco, chicken, peck, flock, revenge trigger chicken + Link emoji reactions.
Keywords like wisdom, courage, power, triforce, goddess trigger an animated Triforce emoji.
When a link is fixed and reposted via webhook, there's a 5% chance of:
Da-da-da-daaa! 🗝️
- Bot not responding? Ensure Message Content Intent is enabled in the Discord Developer Portal.
- Permission errors? Verify the bot's role has the required permissions in your server.
- Token issues? Regenerate your token in the Discord Developer Portal.
- Slash commands not appearing? Wait up to 1 hour for Discord to cache, or kick + re-invite the bot to force a refresh.
See CONTRIBUTING.md for guidelines. Security professionals are especially welcome to review implementations and suggest improvements.
See SECURITY.md for vulnerability reporting and safe harbor.
The Legend of Zelda, Link, and all related properties are trademarks of Nintendo Co., Ltd. This project is not affiliated with, endorsed by, or sponsored by Nintendo. All Zelda-related references are used as fan tribute only in a free, non-commercial project.
MIT
This project was developed by me, a solo developer who wanted this project to exist not because I'm an expert in security, but because Discord servers deserve better link safety. Also note AI tools (Deepseek, Qwen via local LLM, and Cursor) were used to assist with some feature implementations and debugging.