A feature-rich Discord economy bot with slash commands, mining system, shop, and games!
Made with โค๏ธ by Azzam Codex x Nata Dev
- โ๏ธ Mining with cooldown system and special bonuses
- ๐ Daily Rewards with streak bonuses
- ๐ Level & EXP progression system
- ๐ Diamond Currency for premium items
- ๐๏ธ Interactive Shop with autocomplete
- ๐ Inventory System for tools and boosts
- โ๏ธ Pickaxe Upgrades with mining efficiency bonuses
- โจ Special Items and role rewards
- ๐ฐ Slot Machine with multiplier rewards
- ๐ช Coin Flip with 50/50 chance
- ๐ฐ Betting System with risk management
- ๐ Leaderboard top 10 players
- ๐ค User Profiles with detailed stats
- ๐ Special User exclusive benefits
- โก Slash Commands modern Discord integration
- ๐พ SQLite Database reliable data storage
- ๐ Cooldown System balanced gameplay
- ๐จ Custom Embeds with beautiful footer
- ๐ Error Handling smooth user experience
- Node.js 16.9.0 or higher
- Discord Bot Token
- Git
-
Clone the repository
git clone https://github.com/your-username/discord-economy-bot.git cd discord-economy-bot -
Install dependencies
npm install
-
Configuration
- Rename
config.example.jstoconfig.js - Fill in your bot credentials:
module.exports = { BOT_TOKEN: "your-bot-token-here", CLIENT_ID: "your-client-id-here", SPECIAL_USER_ID: "your-special-user-id", // ... other config };
- Rename
-
Deploy Commands
npm run deploy
-
Start the Bot
npm start
Or use the batch file on Windows:
start.bat
| Command | Description | Options |
|---|---|---|
/mine |
Mine for coins (5min cooldown) | None |
/daily |
Claim daily rewards | None |
/balance |
Check user balance | user (optional) |
| Command | Description | Options |
|---|---|---|
/shop |
View all available items | None |
/buy |
Purchase items from shop | item_id (autocomplete) |
| Command | Description | Options |
|---|---|---|
/slots |
Play slot machine | bet (min 10) |
/coinflip |
Coin flip game | bet, choice (heads/tails) |
| Command | Description | Options |
|---|---|---|
/leaderboard |
Top 10 players | None |
/help |
Show help menu | None |
- Go to Discord Developer Portal
- Create a new application
- Go to "Bot" section and create a bot
- Copy the token to
config.js - Enable required intents:
- Message Content Intent
- Server Members Intent
Use this invite link (replace CLIENT_ID with your bot's client ID):
https://discord.com/oauth2/authorize?client_id=YOUR_CLIENT_ID&permissions=2147485696&scope=bot%20applications.commands
| Column | Type | Description |
|---|---|---|
| user_id | TEXT PRIMARY KEY | Discord User ID |
| username | TEXT | Discord Username |
| coins | INTEGER | User's coins balance |
| diamonds | INTEGER | User's diamonds balance |
| level | INTEGER | User's current level |
| exp | INTEGER | Current experience points |
| last_mine | TEXT | Last mining timestamp |
| last_daily | TEXT | Last daily reward timestamp |
| inventory | TEXT | JSON string of user's inventory |
| created_at | DATETIME | Account creation date |
| Column | Type | Description |
|---|---|---|
| item_id | TEXT PRIMARY KEY | Unique item identifier |
| name | TEXT | Display name of item |
| price | INTEGER | Item price in coins |
| item_type | TEXT | Type of item (tool/boost/role) |
| description | TEXT | Item description |
Users with the configured SPECIAL_USER_ID receive:
- +50 Bonus Coins on every mine
- +200 Extra Coins on daily rewards
- +3 Extra Diamonds on daily rewards
- Special Messages and recognition
- Priority Access to new features
| Pickaxe | Price | Bonus | Description |
|---|---|---|---|
| Basic | ๐ช 100 | +10% | Starter pickaxe |
| Iron | ๐ช 500 | +25% | Improved efficiency |
| Diamond | ๐ช 2000 | +50% | Maximum mining power |
discord-economy-bot/
โโโ index.js # Main bot file
โโโ config.js # Configuration file
โโโ commands.js # Slash commands definitions
โโโ deploy-commands.js # Command deployment script
โโโ economyManager.js # Economy system logic
โโโ database.js # Database management
โโโ package.json # Dependencies and scripts
โโโ README.md # This file
- Add command to
commands.js:
newCommand: {
data: new SlashCommandBuilder()
.setName('newcommand')
.setDescription('Command description'),
execute: async (interaction, economy, database) => {
// Command logic here
}
}- Redeploy commands:
npm run deployโ Commands not appearing
- Run
npm run deployto register commands - Wait up to 1 hour for global command propagation
โ Bot not responding
- Check if bot token is correct in
config.js - Verify bot has proper permissions in server
โ Database errors
- Ensure write permissions in bot directory
- Check if
economy.dbis not corrupted
โ Cooldown not working
- Verify system time is correct
- Check database connection
We welcome contributions! Please feel free to submit pull requests or open issues for bugs and feature requests.
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Azzam Codex - Initial work & core development
- Nata Dev - Feature development & maintenance
- Discord.js community for excellent documentation
- Contributors and testers
- Everyone who supported this project
