A comprehensive Discord bot that provides link safety verification, XP leveling system, gaming content filtering, and cute GIF sharing to enhance your server's security and community engagement.
- Automatic URL Scanning: Monitors all messages for links and automatically checks their safety
- Malicious Domain Detection: Identifies known phishing, scam, and malware domains
- Token Grabber Protection: Specifically detects Discord webhook URLs and token-stealing attempts
- Pattern Recognition: Uses advanced regex patterns to identify suspicious content
- Real-time Analysis: Performs HTTP requests to analyze website headers and content
- Safety Embeds: Sends detailed safety reports with color-coded warnings
- DM Warnings: Privately alerts users who share dangerous links
- Message XP: Start with 125 XP per message, increases by 25 XP every 10 messages
- Voice XP: Earn 200 XP per minute spent in voice channels
- Level Progression: Exponential level requirements (1000 XP base, multiplied by 1.2^level)
- Level Up Notifications: Celebratory embeds with progress tracking
- Leaderboard: View top users with
levels
command - Individual Stats: Check user progress with
lvl @user
- Admin Controls: Bot owner can modify user levels with
lvl @user <level>
- Data Persistence: All XP and level data saved to JSON file
- Smart Detection: Identifies gaming-related messages and promotions
- Context Analysis: Recognizes patterns like "4v4", "custom match", "scrims & tournaments"
- Promotion Blocking: Filters Instagram account promotions and self-advertising
- @everyone Protection: Special handling for mass gaming invitations
- Educational Responses: Provides clear guidelines on acceptable content
- Server Focus: Keeps discussions centered on development and programming
- Designated Channel: Sends tiny, adorable GIFs in specific channel (ID: 1377703145941106738)
- Curated Collection: 30+ hand-picked small, cute animal GIFs
- Special Level Up GIFs: Celebration GIFs for level progression
- Optimized Size: Focus on tiny, lightweight GIFs for better performance
- Random Selection: Different cute GIF for every message
- Slash Command Interface: Modern
/embed
command with extensive options - Multiple Styles: 7 different embed colors and themes
- Rich Content Support: Images, thumbnails, videos, custom authors
- Auto-splitting: Handles long messages by creating multiple embeds
- Permission Validation: Checks channel permissions before sending
- URL Validation: Verifies all provided URLs are valid and safe
- Owner Restricted: Only bot owner can create embeds
- Node.js 20+ installed
- Discord Bot Token
- Discord Application with proper intents enabled
npm install discord.js axios dotenv node-cron url-parse
Create a .env
file with:
DISCORD_BOT_TOKEN=your_discord_bot_token_here
- Go to Discord Developer Portal
- Create a new application and bot
- Enable these Gateway Intents:
- Guilds
- Guild Messages
- Message Content
- Direct Messages
- Guild Voice States
Ensure your bot has these permissions:
- Send Messages
- Embed Links
- View Channels
- Read Message History
- Use Slash Commands
- Connect (for voice tracking)
Update these constants in index.js
:
const LEVEL_UP_CHANNEL = 'your_level_up_channel_id';
const BOT_OWNER_ID = 'your_discord_user_id';
const CUTE_GIF_CHANNEL = 'your_gif_channel_id';
/embed
- Create and send custom embeds (Owner only)message
: Embed content (required)channel
: Target channel (optional)style
: Embed style/color (optional)image
: Image URL (optional)thumbnail
: Thumbnail URL (optional)video
: Video URL (optional)author_name
: Author name (optional)author_icon
: Author icon URL (optional)emojis
: Add cute emojis (optional)
levels
- Display XP leaderboardlvl @user
- Check user's level and statslvl @user <number>
- Set user's level
// Message XP: Base 125 XP + (25 XP Γ (messageCount Γ· 10))
// Voice XP: 200 XP per minute
// Level Requirements: 1000 Γ (1.2 ^ (level - 2))
- Malicious Domain Database: 50+ known dangerous domains
- Pattern Recognition: 20+ suspicious URL patterns
- File Extension Checking: Blocks dangerous executable files
- URL Shortener Detection: Flags potentially hidden malicious links
- Response Header Analysis: Examines server responses for threats
- Timeout Protection: Handles unresponsive/suspicious websites
- User Data: Stored in
userdata.json
- Auto-saving: Data saved every 5 minutes
- Backup System: Persistent storage prevents data loss
- Voice Tracking: Real-time voice channel monitoring
Update the cuteGifs
array with new tiny, cute GIF URLs:
const cuteGifs = [
'https://media.giphy.com/media/your_gif_id/giphy.gif',
// Add more...
];
Modify embed colors and styles in the interaction handler:
case 'custom':
color = 0xYOURCOLOR;
title = 'π¨ Custom Style';
break;
Add new malicious patterns to detect:
const suspiciousPatterns = [
/your_custom_pattern/i,
// Add more patterns...
];
This bot is optimized for Replit deployment:
- Import Project: Fork or import this repository to Replit
- Environment Variables: Use Replit's Secrets tab to set
DISCORD_BOT_TOKEN
- Auto-start: The bot will automatically install dependencies
- Always On: Enable "Always On" for 24/7 operation
- Monitoring: Check console logs for real-time activity
- Nix Environment: Uses Node.js 20 with optimal performance
- Workflow Integration: Configured run button for easy deployment
- File Persistence: Data automatically saved to Replit's filesystem
- Error Handling: Comprehensive error logging for debugging
The bot logs various activities:
- URL safety checks with results
- XP gains and level progressions
- Gaming content detections
- Command usage and errors
- Voice channel activity
- No Token Storage: Bot tokens stored securely in environment variables
- Local Data Only: All user data kept within your server
- Permission Controlled: Commands restricted to appropriate users
- Safe Link Checking: External API calls only for URL verification
- Private Warnings: Malicious link alerts sent via DM
- Token Invalid: Ensure
DISCORD_BOT_TOKEN
is correctly set in Secrets - Missing Permissions: Verify bot has required permissions in target channels
- Command Not Working: Check if user has appropriate permissions
- XP Not Saving: Ensure write permissions for
userdata.json
- GIFs Not Sending: Verify channel ID is correct and bot has embed permissions
Enable detailed logging by setting:
console.log('Debug mode enabled');
This project is open source. Feel free to modify and distribute according to your needs.
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
For support or questions:
- Check the console logs for error details
- Verify all permissions and configuration
- Ensure Discord API limits aren't exceeded
- Test commands in a development server first
Made with β€οΈ by script - Keeping Discord servers safe and cute!