A feature-rich Discord bot with advanced leveling, RPG mechanics, music playback, and moderation tools. Built with TypeScript and Discord.js v14.
💬 Need help? Join our Discord community!
🔗 https://discord.gg/a3tGyAwVRc
- YouTube Integration: Play from URLs or search queries
- Spotify Support: Direct Spotify track and playlist playback
- Queue Management: Advanced queue with shuffle and loop
- Voice Controls: Skip, pause, resume, and volume control
- High-Quality Audio: FFmpeg integration for optimal sound
- Message XP: Earn XP for every message sent
- Voice XP: Bonus XP for time spent in voice channels
- Level Progression: 100 XP per level with exponential scaling
- Anti-Spam Protection: Prevents XP farming
- Leaderboards: Server-wide and global rankings
- Profile Cards: Beautiful level display with avatars
- 4 Character Classes: Warrior, Mage, Archer, Priest
- 6 Core Stats: Strength, Dexterity, Intelligence, Vitality, Wisdom, Charisma
- Adventure System: Explore dungeons and battle enemies
- Equipment System: Weapons, armor, and accessories
- Training System: Improve specific stats
- Daily Rewards: Claim daily bonuses and rest periods
- Auto-Moderation: Anti-spam and raid protection
- User Management: Ban, kick, mute, and warn commands
- Logging System: Comprehensive action logging
- Verification System: Role-based verification
- Anti-Raid: Automatic raid detection and response
- Wordle: Classic word guessing game
- Hangman: Interactive hangman with custom words
- Tic-Tac-Toe: Multiplayer tic-tac-toe
- Trivia: Quiz system with multiple categories
- Would You Rather: Interactive polls
- Ship Calculator: Relationship compatibility
- Translation: Multi-language translation support
- Weather: Real-time weather information
- Calculator: Advanced mathematical operations
- Reminder System: Set and manage reminders
- Webhook Management: Create and manage webhooks
- Server Analytics: Detailed server statistics
- User Profiles: Detailed user information and statistics
- Server Info: Comprehensive server analytics
- Bot Statistics: Performance and usage metrics
- Avatar Display: High-quality avatar viewing
- Node.js 18.0.0 or higher
- npm or yarn package manager
- Discord Bot Token
- Download and extract the Discord bot files
- Double-click
start-bot-manager.bat
- Follow the prompts to configure your Discord bot
- Start your bot with
npm start
- Download and extract the Discord bot files
- Open terminal in the bot directory
- Make setup script executable:
chmod +x setup.sh
- Run the setup script:
./setup.sh
- Edit the .env file with your Discord bot token
- Start your bot with
npm start
Troubleshooting:
- If you get permission errors, try:
chmod +x setup.sh
- If npm install fails, try:
sudo apt update && sudo apt install build-essential
- For voice features, you may need:
sudo apt install ffmpeg
-
Clone the repository
git clone https://github.com/M1tsumi/DiscordDemo.git cd DiscordDemo
-
Install dependencies
npm install
-
Set up environment variables
cp env.template .env
Edit
.env
with your configuration (see Configuration section below) -
Build the project
npm run build
-
Start the Discord bot
npm start
For development with auto-restart:
npm run dev
# Required: Discord Bot Token
DISCORD_TOKEN=your_discord_bot_token_here
# Optional: Spotify API (for enhanced music features)
SPOTIFY_CLIENT_ID=your_spotify_client_id
SPOTIFY_CLIENT_SECRET=your_spotify_client_secret
# Optional: YouTube API (for enhanced video features)
YOUTUBE_API_KEY=your_youtube_api_key
Your Discord bot needs the following permissions:
- Send Messages
- Manage Messages
- Embed Links
- Attach Files
- Use External Emojis
- Add Reactions
- Connect (for voice features)
- Speak (for voice features)
- Use Voice Activity
- Ban Members (for moderation)
- Kick Members (for moderation)
- Manage Roles (for moderation)
To fix the "disallowed intents" error, you MUST enable these intents in your Discord application:
- Go to https://discord.com/developers/applications
- Select your bot application
- Go to "Bot" section in the left sidebar
- Scroll down to "Privileged Gateway Intents"
- Enable ALL THREE intents:
- ✅ PRESENCE INTENT
- ✅ SERVER MEMBERS INTENT
- ✅ MESSAGE CONTENT INTENT
- Click "Save Changes"
Error Message: used disallowed intents at websocketshard connection.onclose
Solution:
- Go to https://discord.com/developers/applications
- Select your bot application
- Go to "Bot" section
- Enable all three Privileged Gateway Intents:
- ✅ PRESENCE INTENT
- ✅ SERVER MEMBERS INTENT
- ✅ MESSAGE CONTENT INTENT
- Click "Save Changes"
- Restart your bot
Error Message: Invalid token
Solution:
- Check your
.env
file has the correct token - Get a fresh token from Discord Developer Portal
- Make sure there are no extra spaces or characters
- Verify the token is copied correctly
Error Message: Cannot find module './dist/index.js'
Solution:
- Run
npm run build
to compile TypeScript - Make sure the
dist
folder exists - Check that all dependencies are installed:
npm install
Error Message: Permission denied
Solution:
chmod +x setup.sh
chmod +x start-linux.sh
Error Message: FFmpeg not found
Solution:
# Ubuntu/Debian
sudo apt update && sudo apt install ffmpeg
# CentOS/RHEL
sudo yum install ffmpeg
# macOS
brew install ffmpeg
Error Message: SyntaxError: Unexpected token
Solution:
- Update Node.js to version 18 or higher
- Download from: https://nodejs.org/
- Verify with:
node --version
Error Message: DISCORD_TOKEN is not set
Solution:
- Make sure
.env
file exists in the root directory - Check the file format (no spaces around
=
) - Restart the bot after editing
.env
Error Message: TypeScript compilation errors
Solution:
- Clear build cache:
rm -rf dist/
- Reinstall dependencies:
rm -rf node_modules && npm install
- Rebuild:
npm run build
Error Message: Various runtime errors
Solution:
- Check Discord status: https://status.discord.com/
- Verify bot permissions in servers
- Check console for specific error messages
- Try development mode:
npm run dev
!play <url/query>
- Play music from YouTube or Spotify!queue
- Display current music queue!skip
- Skip current song!stop
- Stop playback and clear queue
!profile-level
- View your leveling profile!leaderboard-level
- View server leveling rankings!rank
- View your rank and top users
!create
- Create your RPG character!profile-rpg
- View your RPG character profile!adventure
- Start an adventure in dungeons!train
- Train your character stats!daily
- Claim daily rewards!rest
- Restore HP, Mana, and Stamina!leaderboard-rpg
- View RPG rankings!rank-rpg
- View your RPG rank
!ban <user> [reason]
- Ban a user!kick <user> [reason]
- Kick a user!mute <user> [duration] [reason]
- Mute a user!warn <user> [reason]
- Warn a user!purge <amount>
- Delete multiple messages
!wordle
- Play Wordle!hangman
- Play Hangman!tictactoe <@user>
- Play Tic-Tac-Toe!trivia
- Start a trivia game!joke
- Get a random joke!meme
- Get a random meme!quote
- Get an inspirational quote
!translate <text>
- Translate text!weather <city>
- Get weather information!calculator <expression>
- Calculate math expressions!reminder <time> <message>
- Set a reminder!help
- View all commands
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
- Fork the repository
- Install dependencies:
npm install
- Set up environment:
cp env.template .env
- Start development:
npm run dev
This project is licensed under the MIT License - see the LICENSE file for details.
💬 Need help? Join our Discord community!
🔗 https://discord.gg/a3tGyAwVRc
- Discord: @quefep
- Issues: GitHub Issues
- Documentation: See README.md
Stay updated with the latest features and bug fixes by checking our releases regularly.
Last Updated: December 2024