Ehab Bot is a powerful, feature-rich Discord bot designed to enhance your server experience with comprehensive moderation tools, engaging economy systems, utility features, and much more. Built with modern Discord.js v14 and PostgreSQL for optimal performance and data persistence.
Ehab Bot offers a complete suite of tools for Discord server management and community engagement:
|
|
- Node.js 18.0.0 or higher
- PostgreSQL server (recommended) or memory storage fallback
- Discord bot application with proper intents
-
Clone the Repository
git clone https://github.com/your-repo/ehabbot.git cd ehabbot -
Install Dependencies
npm install
-
Configure Environment Variables
cp .env.example .env
Edit
.envwith your configuration (only the following variables require configuration, leave remaining variables as default):# Discord Bot Configuration DISCORD_TOKEN=your_discord_bot_token_here CLIENT_ID=your_discord_client_id_here GUILD_ID=your_discord_guild_id_here # PostgreSQL Configuration (Primary Database) POSTGRES_URL=postgresql://postgres:yourpassword@localhost:5432/ehabbot POSTGRES_HOST=localhost POSTGRES_PORT=5432 POSTGRES_DB=ehabbot POSTGRES_USER=postgres POSTGRES_PASSWORD=yourpassword
Production note:
NODE_ENV=productionLOG_LEVEL=warnfor a clean production console (critical issues + startup status)LOG_LEVEL=infoif you want more detailed operational logs- If your chosen
PORTis already used, Ehab Bot automatically tries the next port(s)
Environment options reference:
NODE_ENV:development,production,test(any non-productionvalue is treated as non-production)LOG_LEVEL:error,warn,info,http,verbose,debug,silly- Accepted aliases for
LOG_LEVELin this bot:warns,warning,warnings→warn
Recommended production
.env(easy mode + default mode):NODE_ENV=production LOG_LEVEL=warn WEB_HOST=0.0.0.0 PORT=3000 PORT_RETRY_ATTEMPTS=5
This gives clear startup/online status messages while keeping logs simple for non-technical operators. If port
3000is busy, the bot tries the next available ports automatically (up toPORT_RETRY_ATTEMPTS). -
Setup PostgreSQL Database (Optional but recommended)
# Create database and user createdb ehabbot createuser ehabbot psql -c "ALTER USER ehabbot PASSWORD 'yourpassword';" psql -c "GRANT ALL PRIVILEGES ON DATABASE ehabbot TO ehabbot;"
-
Start the Bot
npm start
Ehab Bot requires the following Discord intents:
- Guilds
- Guild Messages
- Message Content
- Guild Members
- Guild Message Reactions
- Guild Voice States
- Direct Messages
- Bot
- Applications.commands
- View Channels
- Send Messages
- Embed Links
- Attach Files
- Read Message History
- Manage Messages
- Manage Channels
- Manage Roles
- Kick Members
- Manage Messages
- Ban Members
- Moderate Members
- Connect
We welcome contributions to Ehab Bot! Here's how you can help:
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
- Follow existing code style
- Add proper error handling
- Include documentation for new features
- Test with PostgreSQL and memory storage
Ehab Bot is released under the MIT License. See LICENSE for details.
Thank you for choosing Ehab Bot for your Discord server! We're constantly working to improve and add new features based on community feedback.
Last updated: June 2026