rip_monsterz
📎 1 file 5,260 chars
📄
text.txt
txt 366 lines
▶
ADVANCED DISCORD ECONOMY BOT PROMPT (NEO ECONOMY)

Role:
You are a professional Discord bot developer experienced with Node.js and discord.js v14.

Task:
Create a unique advanced Discord economy bot with a prefix command system, redeem codes, shop system, user registration (ToS acceptance), and bot-owner control commands.

The bot must be modular, scalable, and designed for large servers.

Core Technologies:
Use the following technologies:

Node.js
discord.js v14
SQLite database
Prefix command system
Command handler
Event handler
Cooldown system

Prefix System:

The bot must use a prefix command system.

Default prefix: neo

The prefix must work in any letter case such as:

neo
Neo
NEO
nEo
neO
NEo

Example usage:

neo daily
Neo profile
NEO redeem CODE

The prefix must be saved per server in the database.

First-Time User Registration (ToS System):

When a user uses the bot for the first time, the bot must require them to accept Terms of Service.

Example command:
neo register

Bot message example:

Do you accept the Neo Economy Bot Terms of Service?

Type:
neo accept
or
neo decline

Behavior:

If the user types neo accept → their data is stored in the database.
If the user types neo decline → their data is not stored and they cannot use the economy system.

Only users who accept ToS can use the bot.

Database user fields should include:

userID
balance
level
progress
dailyStreak
inventory

Currency System:

The bot should use one main currency.

Currency name: NeoCoins

Users can obtain NeoCoins through:

Daily rewards
Redeem codes
Selling items
Events

Unique Level System:

Create a progress-based level system.

Users gain progress points from:

Claiming daily rewards
Redeeming codes
Buying items

Levels increase:

Daily reward value
Leaderboard ranking

Example level rewards:

Level 1 → 500 daily
Level 5 → 900 daily
Level 10 → 1500 daily
Level 20 → 2500 daily

Commands:

neo level
neo progress

Daily Reward System:

Command:
neo daily

Features:

24 hour cooldown
Reward based on user level
Daily streak bonus
Random lucky bonus

Example result:

Daily Claimed!

Base reward: 800 NeoCoins
Streak bonus: +200
Lucky bonus: +150

Total: 1150 NeoCoins

Leaderboard System:

Commands:

neo lb
neo leaderboard

Leaderboards should include:

Richest users
Highest level users
Highest daily streak

Leaderboard must support pagination.

Shop System:

Create a shop and inventory system.

Commands:

neo shop
neo buy
neo sell
neo inventory

Shop categories:

Items
Weapons
Boosts

Example Items:

Lucky Charm
Energy Drink
Daily Booster

Example Weapons:

Bronze Sword
Iron Blade
Phantom Katana

Example Boosts:

2x Daily Reward Boost
Lucky Drop Boost
XP Boost

All items must be stored in user inventory.

Redeem Code System:

Users can redeem codes.

Command:

neo redeem CODE

Codes may reward:

NeoCoins
Items
Weapons
Earning boosts

Each code must support:

Maximum usage limit
Expiration time
Per-user usage protection

Bot Owner Code Creation:

Only the bot owner can create redeem codes.

Command format:

neocreate-code [maxUses] [expireTimeSeconds] [optional rewards]

Example:

neocreate-code 100 3600 cash=500

Meaning:

100 total uses
Expires in 1 hour
Gives 500 NeoCoins

Example with multiple rewards:

neocreate-code 50 0 cash=1000 item=luckycharm boost=2x

Meaning:

50 uses
No expiration
Gives coins, item, and boost

Optional reward parameters:

cash=
item=
weapon=
boost=

Global Code Announcement:

When the bot owner creates a redeem code, the bot must DM every registered user.

Example DM message:

NEW REDEEM CODE AVAILABLE

Code: NEOSUMMER

Rewards:
500 NeoCoins
Lucky Charm

Use command:
neo redeem NEOSUMMER

Only users who accepted ToS should receive this DM.

Profile System:

Command:

neo profile

Display:

Balance
Level
Progress
Daily streak
Inventory size
Leaderboard rank

Inventory System:

Command:

neo inventory

Displays:

Owned items
Owned weapons
Active boosts

Bot Owner Only Commands:

These commands must only work for the bot owner ID.

neoadd-coins
neoset-coins
neoremove-coins
neo-setlevel
neo-resetuser
neo-blacklist
neo-unblacklist
neocreate-code
neodelete-code
neo-maintenance
neo-eval
neo-reload
neo-shutdown

Anti-Abuse System:

Implement the following protections:

Daily cooldown enforcement
Redeem abuse prevention
Duplicate claim protection
Blacklist system

Database Tables:

users
guilds
inventory
redeem_codes
redeem_history
blacklist
transactions

File Structure:

/commands
economy
owner
shop

/events

/database

/utils

config.json
index.js

Config File Example:

token: BOT_TOKEN
defaultPrefix: neo
ownerID: BOT_OWNER_ID
currencyName: NeoCoins
dailyCooldown: 86400000

Output Requirements:

The AI must generate:

Full bot code
Command files
Database schema
Command handler
Event handler
Setup instructions
Example config file

The bot should be optimized for large servers and designed for scalability.
Kodari AI
KodariMar 14 at 6:58 am 24,351 (v2)

I’ll create a comprehensive advanced Discord economy bot called “Neo Economy” with all the features specified.

NeoEconomyBot
An advanced Discord economy bot featuring a case-insensitive prefix system, user registration with ToS acceptance, progress-based leveling, daily rewards with streaks, shop system with items/weapons/boosts, redeem code system with owner controls, multiple leaderboards, comprehensive inventory management, and global code announcement via DMs. Built with discord.js v14 and SQLite for scalability in large servers.

Perfect! I’ve created a comprehensive advanced Discord economy bot with all the requested features. Here’s what has been implemented:

✅ Features Implemented:

Core Systems:

  • ✅ Case-insensitive prefix system (“neo”, “Neo”, “NEO”, etc.)

  • ✅ SQLite database with better-sqlite3

  • ✅ Command handler with aliases

  • ✅ Event handler

  • ✅ Cooldown system

User Registration & ToS:

  • ✅ Registration requirement with Terms of Service

  • ✅ Accept/Decline commands

  • ✅ Database tracking of registered users

Economy System:

  • ✅ NeoCoins currency

  • ✅ Balance tracking and transactions

  • ✅ Progress-based leveling (1000 progress per level)

  • ✅ Level-based daily rewards

Daily Rewards:

  • ✅ 24-hour cooldown

  • ✅ Level-based rewards

  • ✅ Streak bonus system

  • ✅ Random lucky bonus

  • ✅ Boost multipliers (2x daily, daily booster)

Shop System:

  • ✅ Items, Weapons, and Boosts categories

  • ✅ Buy/Sell functionality

  • ✅ Inventory management

  • ✅ Time-limited boosts

Redeem Codes:

  • ✅ Code creation with multiple reward types

  • ✅ Max usage limits

  • ✅ Expiration times

  • ✅ Per-user redemption tracking

  • ✅ Global DM announcements to all registered users

Leaderboards:

  • ✅ Balance, Level, and Streak leaderboards

  • ✅ Pagination support

  • ✅ User rank display

Owner Commands:

  • ✅ Create/Delete redeem codes

  • ✅ Add/Set/Remove coins

  • ✅ Set user level

  • ✅ Reset user data

  • ✅ Blacklist/Unblacklist users

  • ✅ Maintenance mode

  • ✅ Eval command

  • ✅ Reload commands

  • ✅ Shutdown bot

Anti-Abuse:

  • ✅ Cooldown enforcement

  • ✅ Single redemption per code per user

  • ✅ Blacklist system

  • ✅ Registration requirement

📦 Setup Instructions:

  1. Install dependencies: npm install

  2. Edit .env file with your bot token and owner ID

  3. Run the bot: npm start

  4. Invite bot to your server with proper permissions (Send Messages, Embed Links, Read Message History)

The bot is now ready to use! 🎉

rip_monsterz

Change the level system to that only bot commands used message are counted in it, other message are not counted.

Kodari AI
KodariMar 14 at 7:00 am 4,846 (v2)

I’ll help you modify the level system to only count bot command messages. Let me first read the relevant files to understand the current implementation.

I’ll modify the message event handler to add progress only when users successfully execute bot commands.

Plan:

  • Update events/messageCreate.js to add progress after successful command execution

  • Keep the existing progress sources (daily, redeem, shop) as they are command-based too

  • Add a small amount of progress per command use (e.g., 5-10 progress per command)

Modified the level system to count only bot command usage - each successful command execution now grants 5 progress points to registered users, while regular non-command messages are ignored.

rip_monsterz

Remove owners only commands from the help cmd and add owner only help cmd which shows all owners command in owner dm (if user try to use owner cmd then no response from the bot and if owner try to use owner cmd then bot shows that cmd usage)

Kodari AI
KodariMar 14 at 8:07 am 5,917 (v2)

I’ll help you remove owner commands from the regular help command and create a separate owner-only help command. Let me first read the relevant files to understand the current structure.

Now I’ll implement the changes:

Plan:

  1. Update help.js to remove owner commands section entirely

  2. Create ownerhelp.js command that only responds to owner in DMs

  3. Update messageCreate.js to handle owner commands in DMs

All changes implemented successfully! The bot now:

  • Shows only regular commands in the neo help command

  • Has a separate neo ownerhelp command that only works in DMs with the owner

  • Non-owners get no response when trying to use owner commands

  • Owner can use all owner commands in DMs with proper usage displayed

rip_monsterz

Add a optional in create code command: code name, and all optional will be written in "", for example:- neo createcode 10 1400 code="100KSPECIAL" cash="20000"

Kodari AI
KodariMar 14 at 8:10 am 4,041 (v2)

I’ll read the createcode command file to understand its current structure and then add the optional parameters with the quoted syntax.

I’ll update the createcode command to support optional parameters with quoted values, including a custom code name.

I’ve already completed the update to the createcode.js file. The changes have been applied successfully.

The command now supports:

  • Optional code="CUSTOMNAME" parameter to set a custom code name instead of random generation

  • Optional cash="20000" parameter with quoted values

  • All other optional parameters (item, weapon, boost) also support quoted syntax

Example usage: neo createcode 10 1400 code="100KSPECIAL" cash="20000"

The update is complete and no other files need to be modified for this feature.

rip_monsterz

Add accept and decline buttons in register and remove accept and decline commands, also remove the reply ping in that message where user name is provided in embed or message.

Kodari AI
KodariMar 14 at 8:18 am 4,029 (v2)

I’ll read the relevant files to understand the current implementation before making changes.

I’ll now modify the register command to add buttons, create an interaction handler, and remove the accept/decline commands.

Done! I’ve made the following changes:

  1. Updated register.js - Added Accept and Decline buttons, removed reply ping by using message.channel.send() instead of message.reply()

  2. Created interactionCreate.js - New event handler that processes button clicks, verifies the user, handles registration/decline logic, and disables buttons after interaction

  3. Deleted accept.js and decline.js - Removed the standalone commands as they’re now replaced by buttons

The registration flow now uses interactive buttons, and responses don’t ping the user while still showing their username in embeds.

rip_monsterz

Add prefix command (this change prefix of that server only, not global prefix) and also add item id in shop so users can identify easily and make all items time limit (like if you buy one then it will be for only 1 hour)

Kodari AI
KodariMar 14 at 8:29 am 9,640 (v2)

I’ll help you add a prefix command for per-server prefix changes, add item IDs to the shop, and implement time-limited items. Let me first read the relevant files to understand the current structure.

I’ll implement these three features:

  1. Add a prefix command for per-server prefix changes

  2. Display item IDs in the shop

  3. Make all items expire after 1 hour

✅ Changes implemented successfully:

  1. Prefix Command - Created prefix.js command that allows server managers to change the bot prefix for their server only (requires Manage Server permission)

  2. Item IDs in Shop - Updated shop display to show item IDs clearly so users can easily identify and purchase items

  3. Time-Limited Items - All items now expire after 1 hour when purchased, and the inventory shows time remaining in a user-friendly format (hours and minutes)

Users can now:

  • Change server prefix with neo prefix <new_prefix>

  • See item IDs in the shop with neo shop

  • Buy items that last 1 hour with neo buy <item_id>

  • View time remaining on items in their inventory with neo inventory

rip_monsterz

Add multiple bot owners config

Kodari AI
KodariMar 14 at 8:45 am 8,970 (v2)

I’ll help you add multiple bot owners configuration. Let me first read the relevant files to understand the current structure.

Now I’ll add support for multiple bot owners. Let me implement the necessary changes:

Plan:

  • Add owners array to config.json

  • Create isOwner helper function in utils/helpers.js

  • Update messageCreate event to use the helper

  • Update blacklist command to check all owners

Multiple bot owners support has been added! You can now add multiple owner IDs in the owners array in config.json. The .env file no longer needs OWNER_ID, and all owner checks now use the centralized helper function.

rip_monsterz

Change the items (luckycharm, booster, etc.) which boost specific things into potion bottle which get in our inventory. And that potion bottles can be used by the commands "use [potion id]" and then we can check how much time is left by using "effect" command. Also seperate the items adding from the config and make a different file from where all the items can be made and set the ability and also by the owner only command "oitem add [item id]" that item will be add in shop and by remove that item will be removed. Also by "oitem give [user id] [item id]" owner can give that item to anybpdy.

Kodari AI
KodariMar 16 at 9:03 am 44,973 (v2)

I’ll help you transform the shop items into usable potions with effects, separate item management, and add the necessary commands. Let me first read the relevant files to understand the current structure.

Now I’ll transform your shop system into a potion-based system with active effects. Here’s my plan:

  1. Create items.json for item definitions with effect types

  2. Add active_effects table to database

  3. Create use, effect, and oitem commands

  4. Update shop/inventory/daily to use effects system

  5. Remove items from config.json

All files have been created and updated! The system now features:

✅ Potion-based shop system - Items are now potions stored in data/items.json ✅ Active effects tracking - Potions grant temporary buffs when used ✅ New commands: use [potion_id], effect, oitem add/remove/give/list ✅ Separated item management - Items defined in data/items.json, managed via database ✅ Owner commands - Full control over shop items with oitem command ✅ Effect system - Luck boost, daily boost, XP boost, and energy boost effects ✅ Time tracking - Effects expire after their duration and can be checked with effect command

rip_monsterz

Remove the commands from the help command embed and owner only help command embed which are not in bot and add the commands which are newly added in bot in the help command bed

Kodari can make mistakes. Review important code before using.
Files
commands
data
database
events
utils
config.json
index.js
package.json
Code
41 2,466
index.js
const { Client, GatewayIntentBits, Collection } = require('discord.js');
const fs = require('fs');
const path = require('path');
require('dotenv').config();
const Database = require('./database/database');

const client = new Client({
    intents: [
        GatewayIntentBits.Guilds,
        GatewayIntentBits.GuildMessages,
        GatewayIntentBits.MessageContent,
        GatewayIntentBits.DirectMessages
    ]
});

client.commands = new Collection();
client.cooldowns = new Collection();
client.db = new Database();
client.maintenance = false;

const loadCommands = (dir) => {
    const files = fs.readdirSync(dir);
    
    for (const file of files) {
        const filePath = path.join(dir, file);
        const stat = fs.statSync(filePath);
        
        if (stat.isDirectory()) {
            loadCommands(filePath);
        } else if (file.endsWith('.js')) {
            const command = require(filePath);
            if (command.name) {
                client.commands.set(command.name, command);
                if (command.aliases) {
                    command.aliases.forEach(alias => {
                        client.commands.set(alias, command);
                    });
                }
            }
        }
    }
};

loadCommands(path.join(__dirname, 'commands'));

const eventFiles = fs.readdirSync('./events').filter(file => file.endsWith('.js'));
for (const file of eventFiles) {
    const event = require(`./events/${file}`);
    if (event.once) {
        client.once(event.name, (...args) => event.execute(...args, client));
    } else {
        client.on(event.name, (...args) => event.execute(...args, client));
    }
}

process.on('unhandledRejection', error => {
    console.error('Unhandled promise rejection:', error);
});

process.on('uncaughtException', error => {
    console.error('Uncaught exception:', error);
});

client.login(process.env.DISCORD_TOKEN);