MASTER DEVELOPMENT PROMPT — ELITE's DISCORD BOT
- Project Overview
Build a complete, production-ready, professional Discord bot named ELITE's for the Elites Exchange Discord server.
This bot is primarily an advanced currency-exchange ticket management system, with additional moderation, anti-nuke, reviews, leveling, announcements, embed customization, and administrative tools.
The bot must be fully functional, configurable, secure, modular, and documented. Do not create a demo, mockup, incomplete template, or a bot containing placeholder implementations for core features.
Important requirements:
- Exact bot name: "ELITE's"
- Bot branding must consistently use "ELITE's".
- Embed footer: "Powered by ELITE's"
- No ChatGPT watermark, AI-generated credit, or unwanted developer branding.
- Use custom emojis provided in this prompt wherever appropriate, and standard Unicode emojis where custom emojis are unavailable.
- Build a complete working project with all required files.
- Include a detailed "README.md".
- Test commands, database persistence, permissions, ticket workflows, dropdowns, buttons, and error handling.
- Do not claim that the project is bug-free unless it has been tested. Fix discovered issues before delivery.
- Recommended Technology Stack
Use:
- Python 3.12 or another Python version supported by the selected dependencies.
- "discord.py" 2.x with slash commands, buttons, select menus, modals, and persistent views.
- SQLite with "aiosqlite" for persistent storage.
- "python-dotenv" for environment configuration.
- "aiohttp" only where required.
- Structured logging and centralized exception handling.
Use asynchronous programming correctly. Follow Discord's current API limits and component restrictions. If a feature requires a newer Discord component API, verify library support before implementing it.
Organize the project into separate modules for tickets, exchanges, moderation, anti-nuke, reviews, leveling, embeds, configuration, database, and utilities.
- Environment Configuration
Provide a complete ".env.example" with documented variables, including:
- "DISCORD_TOKEN"
- "OWNER_ID"
- "DATABASE_PATH"
- "GUILD_ID" (optional)
- "DEFAULT_PREFIX"
- "LOG_CHANNEL_ID"
- "SUPPORT_ROLE_IDS"
- "ADMIN_ROLE_IDS"
- "TIMEZONE"
- "DEBUG"
Never hardcode the bot token, owner ID, private credentials, or other secrets into source code.
Only the user ID specified by "OWNER_ID" can run owner-only commands. Administrator permission alone must never grant access to owner-only commands.
Validate configuration at startup and provide understandable error messages for missing or invalid settings.
- Persistent Database
Implement a reliable database layer using SQLite and "aiosqlite".
Persist:
- Ticket panel configurations.
- Exchange currencies and their custom emojis.
- Sending and receiving currency options.
- Sending and receiving payment applications.
- Ticket categories and staff role assignments.
- Ticket numbering and ticket records.
- Ticket transcripts and relevant metadata.
- Embed templates and panel settings.
- Review channel settings and reviews.
- Leveling configuration, XP, and levels.
- AutoMod rules and punishment durations.
- Anti-nuke configuration and audit records.
- Announcement templates and settings.
- Welcome messages and other configurable modules.
- Bot configuration and moderation logs.
Use database migrations, parameterized SQL queries, sensible indexes, and proper transaction handling.
After a bot restart, all saved settings must remain intact. Reconnect persistent views where supported, restore active ticket state, and handle deleted channels, roles, messages, and unavailable resources gracefully.
Never delete a user's ticket history or configuration simply because the bot restarted.
- Advanced Exchange Ticket System
This is the most important module.
Build a fully customizable exchange-ticket workflow for users exchanging currencies such as INR, PKR, NPR, and other administrator-defined currencies.
5.1 Exchange Panel
Provide commands to:
- Create and send a ticket panel in any selected channel.
- Edit an existing panel.
- Delete a panel with appropriate confirmation.
- Configure multiple panels.
- Preview an embed before publishing.
- Configure panel title, description, color, thumbnail, image URL, footer, and button/select-menu labels.
- Set custom emojis for panel elements.
- Configure the welcome message posted inside a new ticket.
- Edit published panel messages when the bot has permission and the message is still editable.
The panel must use a professional exchange-service design, clean formatting, helpful instructions, and the "Powered by ELITE's" footer.
5.2 Exchange Selection Workflow
When a user interacts with the exchange panel, guide them through these steps in order.
Step 1 — Sending Currency
Display a dropdown asking:
“Which currency are you sending?”
Administrators can add, edit, remove, enable, or disable sending currencies.
Each option should support:
- Currency name.
- Currency code.
- Custom emoji.
- Optional description.
- Active/inactive status.
Example options:
- 🇮🇳 INR
- 🇵🇰 PKR
- 🇳🇵 NPR
Use configured custom emojis when available.
Step 2 — Receiving Currency
Display a separate dropdown asking:
“Which currency do you want to receive?”
The receiving currencies must be independently configurable.
Allow administrators to add, edit, remove, reorder, enable, and disable receiving options, including custom emoji and descriptions.
Prevent invalid or unsupported currency combinations according to administrator-defined exchange rules.
Step 3 — Sending Payment Application
Ask:
“Which application will you use to send the money?”
Examples may include Easypaisa, bank transfer, and other administrator-configured applications.
Allow administrators to manage application names, custom emojis, descriptions, and availability.
Step 4 — Receiving Payment Application
Ask:
“Which application will you use to receive the money?”
Maintain a separate receiving-application configuration. Do not assume that sending and receiving applications are identical.
Allow administrators to add, edit, remove, reorder, and disable options.
Step 5 — Review and Confirmation
Display an exchange summary showing:
- Sending currency.
- Receiving currency.
- Sending application.
- Receiving application.
- User who initiated the request.
Provide a confirmation button and a cancel button.
Do not add send-amount or receive-amount editing steps to the required workflow. These are not part of the specified initial exchange-creation flow.
Step 6 — Create the Ticket
After confirmation, automatically create a private ticket channel.
The ticket channel must:
- Be visible to the ticket creator.
- Be visible to configured support roles and authorized administrators.
- Deny access to unrelated members by default.
- Include a unique ticket number.
- Use configurable channel naming.
- Store the exchange selections in the database.
- Send a notification to the ticket creator and configured staff role.
- Prevent duplicate tickets caused by repeated button clicks or interaction retries.
Use Discord permissions correctly and never expose the ticket to the entire server accidentally.
5.3 Ticket Welcome Message and Terms Acceptance
When the ticket opens, send a configurable embed containing the exchange summary and Terms of Service.
Require the user to acknowledge the terms before proceeding with the configured exchange workflow.
Provide a button such as “Accept Terms”.
Persist the acceptance status and timestamp. If the user declines or does not accept, keep the exchange workflow appropriately restricted without exposing private information.
Allow administrators to edit the terms, title, description, image URL, thumbnail, color, and footer through commands and configuration files.
5.4 Ticket Control Buttons
Add these four primary buttons to the ticket control panel:
- Close Ticket
- Only authorized support staff and administrators may close tickets by default.
- Require confirmation before closing.
- Record who closed the ticket and when.
- Support configurable closing reasons.
- Prevent unauthorized users from closing tickets.
- Notify
- Allow authorized staff to notify the ticket creator.
- Mention the ticket creator only when appropriate.
- Add cooldowns to prevent notification spam.
- Record the notification in the ticket log.
- Add User
- Allow the ticket creator and authorized staff to add another server member, subject to configuration.
- Provide a member selection interface.
- Grant access only to the selected member.
- Prevent invalid or unauthorized access changes.
- Allow authorized staff to remove an added member.
- Transcript
- Generate a readable transcript of the ticket conversation.
- Include message authors, timestamps, message content, and relevant attachment links where available.
- Deliver the transcript to the ticket creator by DM when possible.
- Store an authorized staff copy or archive it in a configured transcript channel.
- Handle DM failures gracefully.
- Protect transcripts from unauthorized access.
- Do not include bot tokens or private credentials.
The ticket creator must receive a notification when the ticket is created, and configured staff roles must also receive a notification.
5.5 Additional Ticket Features
Implement:
- Ticket claiming by staff.
- Ticket reassignment.
- Ticket priority.
- Ticket notes visible only to authorized staff.
- Ticket reopen functionality.
- Ticket deletion with confirmation.
- Ticket inactivity reminders.
- Optional automatic closure after a configurable inactivity period.
- Ticket statistics.
- Open-ticket limits per user.
- Staff response tracking.
- Ticket audit logs.
- Configurable ticket categories.
- Configurable support role mentions.
- Ticket creation and closure announcements.
- Ticket search by number or user.
- Exportable ticket records.
Use appropriate permissions and configurable retention policies.
- Currency, Category, and Application Management
Provide comprehensive slash commands to manage all exchange options.
Examples:
- "/currency add"
- "/currency edit"
- "/currency remove"
- "/currency list"
- "/currency enable"
- "/currency disable"
- "/exchange-app add"
- "/exchange-app edit"
- "/exchange-app remove"
- "/exchange-app list"
- "/ticket-category add"
- "/ticket-category edit"
- "/ticket-category remove"
- "/ticket-category list"
Use Discord dropdowns and modals wherever they improve usability.
Every option should support a name, optional description, custom emoji, and active status.
Validate duplicate names, unsupported currency pairs, empty values, and invalid emoji input.
Never allow a configuration change to corrupt existing ticket records.
- Custom Emoji System
Use the following exact custom emoji names and IDs provided by the user.
Preserve the distinction between static and animated emoji formats.
<:terms_and_service:1562714864626040936> <:RainyMM_friend:1562714867025190992> <:Thinking:1562714868509843459> <:RainyMM_Crypto:1562714872293101598> <:RainyMM_RainyMM_trial_exch:1562714874629595236> <:RD_Salute:1562714876948910172> <a:lighting:1562759160901275660> <a:reviewstar:1562759163464130671> <a:NitroBoost:1562760520266813570> <a:Boost:1562760942524309514> <a:bots:1562761504502054992> <:AlRajhi:1562762301281411115> <a:Minecraft:1562762877725573183> <a:DISCORD:1562763265837113374> <:robux:1562763875391111209> <a:ITUNES:1562764372777107487> <:steam:1562764777284042812> <a:Valorant:1562765131514122296> <a:Freefire:1562765527049437224> <:windows:1562765795384098876> <a:Xbox:1562766290832203836> <:nintendo:1562766645376843857> <a:PlayStation:1562767016518230060> <:clash_of_clans:1562767750567567402> <a:butterfly_gif:1558874770857140247> <a:bow_arrows_gif:1558874772992032770> <a:bee_gif:1558874774522953788> <a:crystalball_gif:1558874776020459680> <a:clouds_gif:1558874777953902702> <a:article_gif:1558874779753381968> <a:airplane_gif:1558874781825114152> <:cap:1558874783234531379> <:pearlmc:1558874921352831007> <a:crystalball_gif:1558881417801367602> <a:hammer:1558885322513846305> <:money:1558885325449990195> <:envelope:1558885327618310214> <:buy:1558885329904205894> <:status:1558885332269793422> <a:article:1558885334824259606> <:easypaisa:1558885338381029497> <:report:1558885341103136899> <:changes:1558885343678300230> <a:hammer:1558885345855143976> <:tick:1558885348384444416> <:brainlet:1558885350821199932> <a:Application:1558885353367019585> <a:stop_sign:1558885356525461555> <a:sparkles:1558885359088304159> <a:trophy:1558885361697161268> <:envelope:1558885363320226042> <a:sparkles:1558885364645494798> <:Omen_Rage:1559103651505504306>
Emoji Implementation Requirements
Create:
- "config/emojis.json"
- An emoji validation utility.
- A reusable emoji lookup helper.
- Safe fallback handling.
- A complete emoji inventory in "README.md".
For every emoji, document:
- Exact emoji name.
- Exact original emoji ID.
- Static or animated format.
- Suggested use.
- Whether it is configured and available.
- Instructions for replacing the ID after importing the emoji into another server.
Use Discord-formatted custom emoji strings where supported.
Do not assume that a bot can use every custom emoji merely because its ID appears in configuration. Confirm that the emoji is available and usable in the relevant context. Custom emoji visibility depends on the emoji's availability, the bot's permissions, and Discord's access rules.
Allow administrators to configure additional custom emojis for:
- Ticket panels.
- Ticket buttons.
- Exchange currencies.
- Sending and receiving applications.
- Terms acceptance.
- Review messages.
- Help menus.
- Moderation logs.
- Leveling notifications.
- Announcements.
Standard Unicode emoji fallbacks are permitted when custom emojis are missing or unusable.
Do not invent real emoji IDs. Use clearly documented placeholders for additional emojis until the user supplies actual IDs.
- Embed Builder
Implement an advanced embed configuration system.
Commands should allow authorized administrators to:
- Create an embed.
- Edit an embed.
- Preview an embed.
- Publish an embed to a selected channel.
- Edit a previously published bot-owned embed.
- Configure title and description.
- Configure color.
- Set author name and icon.
- Set thumbnail URL.
- Set main image URL.
- Add, edit, reorder, and remove fields.
- Set footer text and icon.
- Configure timestamps.
- Configure buttons and select menus where supported.
- Save reusable templates.
- Duplicate templates.
- Delete templates with confirmation.
The bot should also support configuration of ticket panel messages and ticket welcome messages.
All embed features must validate Discord's current length and component limits.
- Owner-Only Bot Status
Provide owner-only commands to change the bot's presence.
Supported activity types:
- Playing.
- Watching.
- Listening.
- Competing.
- Streaming, subject to Discord's requirements.
Examples:
- "/botstatus set"
- "/botstatus reset"
- "/botstatus view"
Only "OWNER_ID" from ".env" may execute these commands.
An administrator, moderator, or other user must not be able to change the bot's status merely because they have Discord Administrator permission.
Store the configured status persistently, restore it after restart, and allow an optional default status in a configuration file.
- Review System
Implement a professional review system using slash commands.
Setup
"/review setup"
Ask the authorized administrator to select a destination channel and configure:
- Review channel.
- Review embed appearance.
- Whether reviews can be submitted by users with open tickets only.
- Whether duplicate reviews are permitted.
- Optional review cooldown.
- Optional review log channel.
Submit a Review
"/review"
Use an interactive flow:
- Select a rating from 1 to 5 stars.
- Enter the review message in a modal.
- Preview the review if configured.
- Confirm submission.
After submission, publish a formatted review embed in the configured channel.
Include the reviewer, rating, message, and timestamp.
Use the provided animated "reviewstar" emoji where it is available and appropriate. Use a standard star fallback otherwise.
Prevent review spam and unauthorized manipulation of published reviews.
- Leveling and XP System
Implement an optional server leveling system.
Features:
- XP for eligible messages.
- Per-user cooldowns.
- Configurable XP ranges.
- Level-up announcements.
- Custom level-up embeds.
- "/rank"
- "/leaderboard"
- "/leveling setup"
- "/leveling configure"
- "/leveling ignore-channel"
- "/leveling rewards"
Allow role rewards at configurable levels.
Ignore bot messages and configurable channels. Include anti-spam safeguards and database persistence.
- AutoMod
Implement configurable automatic moderation rules, including:
- Anti-link.
- Anti-invite.
- Anti-spam.
- Anti-mass-mention.
- Anti-repeated-message.
- Anti-caps, if enabled.
- Blocked words and phrases.
- Optional suspicious-content detection.
- Configurable ignored channels and roles.
- Exemptions for trusted roles.
Each rule must have a configurable action:
- Delete Message.
- Timeout.
- Ban.
- Kick.
For Timeout, allow administrators to set the duration using seconds, minutes, hours, or days, within Discord's supported limits.
Provide commands such as:
- "/automod setup"
- "/automod rule add"
- "/automod rule edit"
- "/automod rule remove"
- "/automod rule list"
- "/automod punishment"
- "/automod whitelist"
- "/automod logs"
Delete Message must delete the offending message without applying an additional punishment.
Timeout, Ban, and Kick must be executed only when the bot has the necessary permissions and role hierarchy.
Log actions with the rule, user, channel, timestamp, and action taken. Handle missing permissions and API errors gracefully.
- Anti-Nuke Protection
Implement an anti-nuke system designed to protect the server from destructive actions, including:
- Unauthorized channel deletion or creation.
- Unauthorized role deletion or creation.
- Mass bans and kicks.
- Unauthorized webhook creation or deletion.
- Dangerous permission changes.
- Suspicious bot additions.
- Configurable audit-log monitoring.
Features:
- Configurable trusted users and roles.
- Action thresholds within a configurable time window.
- Emergency lockdown.
- Automatic removal of dangerous permissions where safely possible.
- Configurable response actions.
- Security alerts.
- Audit logs.
- Recovery assistance where technically possible.
Do not promise that deleted channels, messages, roles, or other resources can always be restored. Store configuration snapshots where appropriate, but never claim to restore data that Discord no longer provides.
Protect the server owner and explicitly trusted administrators from accidental automated punishment. Never let arbitrary users disable protection or add themselves to the trusted list.
Include setup instructions for the Discord intents and permissions required by this module.
- Announcements and Notifications
Implement:
- "/announce"
- "/announce embed"
- "/announce schedule"
- "/announce template"
- "/announce preview"
Allow authorized staff to publish announcements to a selected channel.
Support custom titles, descriptions, colors, images, thumbnails, timestamps, footers, and configurable mentions.
Prevent accidental mass mentions. Require confirmation for announcements that mention everyone or large role groups.
Scheduled announcements must be persistent and recover after restarts.
- Help Menu and Command Discovery
Create a professional "/help" command.
Display categories such as:
- Exchange Tickets.
- Ticket Administration.
- Currency Management.
- Embed Builder.
- Reviews.
- Leveling.
- AutoMod.
- Anti-Nuke.
- Announcements.
- General Utilities.
- Owner Commands.
Use dropdown menus and buttons for category navigation, subject to Discord's component limits.
Show command descriptions, required permissions, usage examples, and helpful guidance.
Do not reveal sensitive configuration, credentials, or owner-only information to unauthorized users.
- Additional Professional Features
Add useful features where they integrate cleanly with the core system:
- "/ping"
- "/botinfo"
- "/serverinfo"
- "/userinfo"
- "/avatar"
- "/uptime"
- "/stats"
- "/config"
- "/logs"
- "/backup"
- "/restore"
- "/maintenance"
- "/slowmode"
- "/purge"
- "/warn"
- "/warnings"
- "/timeout"
- "/untimeout"
- "/kick"
- "/ban"
- "/unban"
- "/role"
- "/lock"
- "/unlock"
- "/say", with safe permission restrictions.
Also include:
- Welcome and leave messages.
- Configurable logging.
- Staff activity statistics.
- Command cooldowns.
- Permission-aware command responses.
- Safe configuration export and import.
- Health checks.
- Graceful shutdown.
- Database backup and recovery instructions.
- Optional maintenance mode.
Do not add unnecessary features that destabilize the exchange-ticket system. Every advertised command must actually work.
- Security and Permissions
Enforce permissions on the server side for every privileged command and button.
Use:
- "OWNER_ID" for owner-only actions.
- Configurable staff role IDs.
- Configurable administrator role IDs.
- Discord permission checks.
- Role hierarchy checks.
- Input validation.
- Interaction ownership checks.
- Cooldowns and rate limiting.
- Safe error messages.
- Audit logs for sensitive actions.
Never trust a button's appearance or a user's client-side input as proof of authorization.
Never expose tokens, environment variables, private ticket content, transcripts, or database credentials in public channels.
Treat backups and transcripts as sensitive data. Use appropriate file permissions and retention policies.
- Discord Interaction and API Requirements
Follow Discord's current limits and behavior for:
- Slash commands.
- Message components.
- Select-menu options.
- Modal fields.
- Embed titles, descriptions, and fields.
- Message content.
- Interaction response deadlines.
- Rate limits.
- Permission overwrites.
- Persistent views.
A single Discord select menu cannot hold unlimited options. Implement pagination, grouped selections, search modals, or category selection when the number of configured currencies or applications exceeds the supported option count.
Acknowledge interactions before long-running work and use follow-up responses where necessary.
Prevent duplicate ticket creation and race conditions with appropriate database constraints and synchronization.
- Project Structure
Create a clean project structure similar to:
ELITEs/ ├── main.py ├── requirements.txt ├── .env.example ├── .gitignore ├── README.md ├── config/ │ ├── settings.json │ └── emojis.json ├── database/ │ ├── __init__.py │ ├── db.py │ └── migrations/ ├── cogs/ │ ├── tickets.py │ ├── exchange.py │ ├── embeds.py │ ├── reviews.py │ ├── leveling.py │ ├── automod.py │ ├── antinuke.py │ ├── announcements.py │ ├── moderation.py │ ├── utilities.py │ ├── help.py │ └── owner.py ├── utils/ │ ├── permissions.py │ ├── emoji_manager.py │ ├── logging_setup.py │ ├── validators.py │ └── errors.py ├── data/ ├── logs/ └── tests/
You may improve the structure if needed, but keep the code modular and documented.
Do not commit secrets, generated databases containing private user data, or production logs.
- README.md Requirements
Write a detailed, beginner-friendly "README.md" that explains:
- What ELITE's does.
- Required Python version.
- How to create a Discord application and bot.
- How to invite the bot with the required permissions.
- Required intents and how to enable them.
- How to install dependencies.
- How to configure ".env".
- How to set "OWNER_ID".
- How to start the bot.
- How to configure the database.
- How to use all important slash commands.
- How to configure exchange currencies and payment apps.
- How to create and customize ticket panels.
- How to configure staff roles.
- How to edit embeds and images.
- How to configure review channels.
- How to configure AutoMod and Anti-Nuke.
- How to configure bot status.
- How to manage custom emojis.
- How to back up and restore configuration and database files.
- How to update the bot.
- How to troubleshoot common errors.
- How to deploy the bot on a VPS or supported hosting platform.
- How to keep the bot running with a process manager.
- How to securely update configuration without exposing secrets.
Emoji Inventory in README.md
Document every supplied emoji in a table with:
- Emoji name.
- Original emoji ID.
- Static or animated.
- Emoji syntax.
- Suggested use.
- Availability/configuration status.
Include every supplied emoji from the configuration, including entries with repeated names and different IDs.
Explain that copying an emoji's ID into a new server does not automatically create that emoji there. The emoji must be available to the bot, and its configured ID may need to be updated after import.
Provide a clearly marked inventory for future emojis using placeholders rather than fabricated IDs.
- Testing Requirements
Create tests for:
- Database initialization and migrations.
- Persistence after restart.
- Exchange option creation, editing, and removal.
- Invalid currency combinations.
- Ticket creation and duplicate prevention.
- Ticket permission overwrites.
- Unauthorized ticket closure.
- Unauthorized owner-command execution.
- Embed input validation.
- Missing or invalid emoji configuration.
- AutoMod action selection.
- Timeout duration validation.
- Review submission validation.
- XP cooldowns.
- Anti-nuke thresholds.
- Missing Discord permissions.
- Deleted roles and channels.
- Interaction timeout handling.
Provide a clear manual testing checklist for actual Discord testing.
Use mocks for unit tests where appropriate. Do not claim tests passed unless they were actually executed and passed.
- Final Delivery Requirements
Deliver the complete working source code, not just snippets.
Include:
- Every Python module.
- "requirements.txt".
- ".env.example".
- Configuration files.
- Database initialization and migrations.
- Custom emoji configuration.
- Full "README.md".
- Tests.
- Installation and deployment instructions.
Verify imports, command registration, database operations, and persistent-view behavior. Fix discovered syntax errors, missing dependencies, incorrect class names, invalid imports, and incomplete handlers.
Never hardcode real credentials or invent actual emoji IDs.
Do not leave core functionality as TODO comments or placeholder commands.
Final objective: ELITE's must be a polished, reliable, configurable Discord bot for Elites Exchange, with a comprehensive currency exchange-ticket workflow, persistent settings, customizable embeds, custom emoji management, professional administration tools, moderation, anti-nuke protection, reviews, leveling, announcements, and clear documentation.
Prioritize security, correct permissions, maintainability, and reliable functionality over merely adding a large number of commands.
Build the configuration, async SQLite layer, emoji utilities, and bot startup.
Implement the persistent exchange-ticket workflow and its administration commands.
Add reviews, leveling, moderation, announcements, embeds, status, and utilities.
Add tests and full setup, security, emoji-inventory, and deployment documentation.
Bana ke do na
Ek basic Discord bot bana raha hoon:
/hello,/pingaur/helpslash commands.Startup par slash commands sync honge aur
KODARI_READYlog hoga.Token
.envmein rahega; dependenciesrequirements.txtmein.
[Generation stopped]
MASTER DEVELOPMENT PROMPT — ELITE's DISCORD BOT
- Project Overview
Build a complete, production-ready, professional Discord bot named ELITE's for the Elites Exchange Discord server.
This bot is primarily an advanced currency-exchange ticket management system, with additional moderation, anti-nuke, reviews, leveling, announcements, embed customization, and administrative tools.
The bot must be fully functional, configurable, secure, modular, and documented. Do not create a demo, mockup, incomplete template, or a bot containing placeholder implementations for core features.
Important requirements:
- Exact bot name: "ELITE's"
- Bot branding must consistently use "ELITE's".
- Embed footer: "Powered by ELITE's"
- No ChatGPT watermark, AI-generated credit, or unwanted developer branding.
- Use custom emojis provided in this prompt wherever appropriate, and standard Unicode emojis where custom emojis are unavailable.
- Build a complete working project with all required files.
- Include a detailed "README.md".
- Test commands, database persistence, permissions, ticket workflows, dropdowns, buttons, and error handling.
- Do not claim that the project is bug-free unless it has been tested. Fix discovered issues before delivery.
- Recommended Technology Stack
Use:
- Python 3.12 or another Python version supported by the selected dependencies.
- "discord.py" 2.x with slash commands, buttons, select menus, modals, and persistent views.
- SQLite with "aiosqlite" for persistent storage.
- "python-dotenv" for environment configuration.
- "aiohttp" only where required.
- Structured logging and centralized exception handling.
Use asynchronous programming correctly. Follow Discord's current API limits and component restrictions. If a feature requires a newer Discord component API, verify library support before implementing it.
Organize the project into separate modules for tickets, exchanges, moderation, anti-nuke, reviews, leveling, embeds, configuration, database, and utilities.
- Environment Configuration
Provide a complete ".env.example" with documented variables, including:
- "DISCORD_TOKEN"
- "OWNER_ID"
- "DATABASE_PATH"
- "GUILD_ID" (optional)
- "DEFAULT_PREFIX"
- "LOG_CHANNEL_ID"
- "SUPPORT_ROLE_IDS"
- "ADMIN_ROLE_IDS"
- "TIMEZONE"
- "DEBUG"
Never hardcode the bot token, owner ID, private credentials, or other secrets into source code.
Only the user ID specified by "OWNER_ID" can run owner-only commands. Administrator permission alone must never grant access to owner-only commands.
Validate configuration at startup and provide understandable error messages for missing or invalid settings.
- Persistent Database
Implement a reliable database layer using SQLite and "aiosqlite".
Persist:
- Ticket panel configurations.
- Exchange currencies and their custom emojis.
- Sending and receiving currency options.
- Sending and receiving payment applications.
- Ticket categories and staff role assignments.
- Ticket numbering and ticket records.
- Ticket transcripts and relevant metadata.
- Embed templates and panel settings.
- Review channel settings and reviews.
- Leveling configuration, XP, and levels.
- AutoMod rules and punishment durations.
- Anti-nuke configuration and audit records.
- Announcement templates and settings.
- Welcome messages and other configurable modules.
- Bot configuration and moderation logs.
Use database migrations, parameterized SQL queries, sensible indexes, and proper transaction handling.
After a bot restart, all saved settings must remain intact. Reconnect persistent views where supported, restore active ticket state, and handle deleted channels, roles, messages, and unavailable resources gracefully.
Never delete a user's ticket history or configuration simply because the bot restarted.
- Advanced Exchange Ticket System
This is the most important module.
Build a fully customizable exchange-ticket workflow for users exchanging currencies such as INR, PKR, NPR, and other administrator-defined currencies.
5.1 Exchange Panel
Provide commands to:
- Create and send a ticket panel in any selected channel.
- Edit an existing panel.
- Delete a panel with appropriate confirmation.
- Configure multiple panels.
- Preview an embed before publishing.
- Configure panel title, description, color, thumbnail, image URL, footer, and button/select-menu labels.
- Set custom emojis for panel elements.
- Configure the welcome message posted inside a new ticket.
- Edit published panel messages when the bot has permission and the message is still editable.
The panel must use a professional exchange-service design, clean formatting, helpful instructions, and the "Powered by ELITE's" footer.
5.2 Exchange Selection Workflow
When a user interacts with the exchange panel, guide them through these steps in order.
Step 1 — Sending Currency
Display a dropdown asking:
“Which currency are you sending?”
Administrators can add, edit, remove, enable, or disable sending currencies.
Each option should support:
- Currency name.
- Currency code.
- Custom emoji.
- Optional description.
- Active/inactive status.
Example options:
- 🇮🇳 INR
- 🇵🇰 PKR
- 🇳🇵 NPR
Use configured custom emojis when available.
Step 2 — Receiving Currency
Display a separate dropdown asking:
“Which currency do you want to receive?”
The receiving currencies must be independently configurable.
Allow administrators to add, edit, remove, reorder, enable, and disable receiving options, including custom emoji and descriptions.
Prevent invalid or unsupported currency combinations according to administrator-defined exchange rules.
Step 3 — Sending Payment Application
Ask:
“Which application will you use to send the money?”
Examples may include Easypaisa, bank transfer, and other administrator-configured applications.
Allow administrators to manage application names, custom emojis, descriptions, and availability.
Step 4 — Receiving Payment Application
Ask:
“Which application will you use to receive the money?”
Maintain a separate receiving-application configuration. Do not assume that sending and receiving applications are identical.
Allow administrators to add, edit, remove, reorder, and disable options.
Step 5 — Review and Confirmation
Display an exchange summary showing:
- Sending currency.
- Receiving currency.
- Sending application.
- Receiving application.
- User who initiated the request.
Provide a confirmation button and a cancel button.
Do not add send-amount or receive-amount editing steps to the required workflow. These are not part of the specified initial exchange-creation flow.
Step 6 — Create the Ticket
After confirmation, automatically create a private ticket channel.
The ticket channel must:
- Be visible to the ticket creator.
- Be visible to configured support roles and authorized administrators.
- Deny access to unrelated members by default.
- Include a unique ticket number.
- Use configurable channel naming.
- Store the exchange selections in the database.
- Send a notification to the ticket creator and configured staff role.
- Prevent duplicate tickets caused by repeated button clicks or interaction retries.
Use Discord permissions correctly and never expose the ticket to the entire server accidentally.
5.3 Ticket Welcome Message and Terms Acceptance
When the ticket opens, send a configurable embed containing the exchange summary and Terms of Service.
Require the user to acknowledge the terms before proceeding with the configured exchange workflow.
Provide a button such as “Accept Terms”.
Persist the acceptance status and timestamp. If the user declines or does not accept, keep the exchange workflow appropriately restricted without exposing private information.
Allow administrators to edit the terms, title, description, image URL, thumbnail, color, and footer through commands and configuration files.
5.4 Ticket Control Buttons
Add these four primary buttons to the ticket control panel:
- Close Ticket
- Only authorized support staff and administrators may close tickets by default.
- Require confirmation before closing.
- Record who closed the ticket and when.
- Support configurable closing reasons.
- Prevent unauthorized users from closing tickets.
- Notify
- Allow authorized staff to notify the ticket creator.
- Mention the ticket creator only when appropriate.
- Add cooldowns to prevent notification spam.
- Record the notification in the ticket log.
- Add User
- Allow the ticket creator and authorized staff to add another server member, subject to configuration.
- Provide a member selection interface.
- Grant access only to the selected member.
- Prevent invalid or unauthorized access changes.
- Allow authorized staff to remove an added member.
- Transcript
- Generate a readable transcript of the ticket conversation.
- Include message authors, timestamps, message content, and relevant attachment links where available.
- Deliver the transcript to the ticket creator by DM when possible.
- Store an authorized staff copy or archive it in a configured transcript channel.
- Handle DM failures gracefully.
- Protect transcripts from unauthorized access.
- Do not include bot tokens or private credentials.
The ticket creator must receive a notification when the ticket is created, and configured staff roles must also receive a notification.
5.5 Additional Ticket Features
Implement:
- Ticket claiming by staff.
- Ticket reassignment.
- Ticket priority.
- Ticket notes visible only to authorized staff.
- Ticket reopen functionality.
- Ticket deletion with confirmation.
- Ticket inactivity reminders.
- Optional automatic closure after a configurable inactivity period.
- Ticket statistics.
- Open-ticket limits per user.
- Staff response tracking.
- Ticket audit logs.
- Configurable ticket categories.
- Configurable support role mentions.
- Ticket creation and closure announcements.
- Ticket search by number or user.
- Exportable ticket records.
Use appropriate permissions and configurable retention policies.
- Currency, Category, and Application Management
Provide comprehensive slash commands to manage all exchange options.
Examples:
- "/currency add"
- "/currency edit"
- "/currency remove"
- "/currency list"
- "/currency enable"
- "/currency disable"
- "/exchange-app add"
- "/exchange-app edit"
- "/exchange-app remove"
- "/exchange-app list"
- "/ticket-category add"
- "/ticket-category edit"
- "/ticket-category remove"
- "/ticket-category list"
Use Discord dropdowns and modals wherever they improve usability.
Every option should support a name, optional description, custom emoji, and active status.
Validate duplicate names, unsupported currency pairs, empty values, and invalid emoji input.
Never allow a configuration change to corrupt existing ticket records.
- Custom Emoji System
Use the following exact custom emoji names and IDs provided by the user.
Preserve the distinction between static and animated emoji formats.
<:terms_and_service:1562714864626040936> <:RainyMM_friend:1562714867025190992> <:Thinking:1562714868509843459> <:RainyMM_Crypto:1562714872293101598> <:RainyMM_RainyMM_trial_exch:1562714874629595236> <:RD_Salute:1562714876948910172> <a:lighting:1562759160901275660> <a:reviewstar:1562759163464130671> <a:NitroBoost:1562760520266813570> <a:Boost:1562760942524309514> <a:bots:1562761504502054992> <:AlRajhi:1562762301281411115> <a:Minecraft:1562762877725573183> <a:DISCORD:1562763265837113374> <:robux:1562763875391111209> <a:ITUNES:1562764372777107487> <:steam:1562764777284042812> <a:Valorant:1562765131514122296> <a:Freefire:1562765527049437224> <:windows:1562765795384098876> <a:Xbox:1562766290832203836> <:nintendo:1562766645376843857> <a:PlayStation:1562767016518230060> <:clash_of_clans:1562767750567567402> <a:butterfly_gif:1558874770857140247> <a:bow_arrows_gif:1558874772992032770> <a:bee_gif:1558874774522953788> <a:crystalball_gif:1558874776020459680> <a:clouds_gif:1558874777953902702> <a:article_gif:1558874779753381968> <a:airplane_gif:1558874781825114152> <:cap:1558874783234531379> <:pearlmc:1558874921352831007> <a:crystalball_gif:1558881417801367602> <a:hammer:1558885322513846305> <:money:1558885325449990195> <:envelope:1558885327618310214> <:buy:1558885329904205894> <:status:1558885332269793422> <a:article:1558885334824259606> <:easypaisa:1558885338381029497> <:report:1558885341103136899> <:changes:1558885343678300230> <a:hammer:1558885345855143976> <:tick:1558885348384444416> <:brainlet:1558885350821199932> <a:Application:1558885353367019585> <a:stop_sign:1558885356525461555> <a:sparkles:1558885359088304159> <a:trophy:1558885361697161268> <:envelope:1558885363320226042> <a:sparkles:1558885364645494798> <:Omen_Rage:1559103651505504306>
Emoji Implementation Requirements
Create:
- "config/emojis.json"
- An emoji validation utility.
- A reusable emoji lookup helper.
- Safe fallback handling.
- A complete emoji inventory in "README.md".
For every emoji, document:
- Exact emoji name.
- Exact original emoji ID.
- Static or animated format.
- Suggested use.
- Whether it is configured and available.
- Instructions for replacing the ID after importing the emoji into another server.
Use Discord-formatted custom emoji strings where supported.
Do not assume that a bot can use every custom emoji merely because its ID appears in configuration. Confirm that the emoji is available and usable in the relevant context. Custom emoji visibility depends on the emoji's availability, the bot's permissions, and Discord's access rules.
Allow administrators to configure additional custom emojis for:
- Ticket panels.
- Ticket buttons.
- Exchange currencies.
- Sending and receiving applications.
- Terms acceptance.
- Review messages.
- Help menus.
- Moderation logs.
- Leveling notifications.
- Announcements.
Standard Unicode emoji fallbacks are permitted when custom emojis are missing or unusable.
Do not invent real emoji IDs. Use clearly documented placeholders for additional emojis until the user supplies actual IDs.
- Embed Builder
Implement an advanced embed configuration system.
Commands should allow authorized administrators to:
- Create an embed.
- Edit an embed.
- Preview an embed.
- Publish an embed to a selected channel.
- Edit a previously published bot-owned embed.
- Configure title and description.
- Configure color.
- Set author name and icon.
- Set thumbnail URL.
- Set main image URL.
- Add, edit, reorder, and remove fields.
- Set footer text and icon.
- Configure timestamps.
- Configure buttons and select menus where supported.
- Save reusable templates.
- Duplicate templates.
- Delete templates with confirmation.
The bot should also support configuration of ticket panel messages and ticket welcome messages.
All embed features must validate Discord's current length and component limits.
- Owner-Only Bot Status
Provide owner-only commands to change the bot's presence.
Supported activity types:
- Playing.
- Watching.
- Listening.
- Competing.
- Streaming, subject to Discord's requirements.
Examples:
- "/botstatus set"
- "/botstatus reset"
- "/botstatus view"
Only "OWNER_ID" from ".env" may execute these commands.
An administrator, moderator, or other user must not be able to change the bot's status merely because they have Discord Administrator permission.
Store the configured status persistently, restore it after restart, and allow an optional default status in a configuration file.
- Review System
Implement a professional review system using slash commands.
Setup
"/review setup"
Ask the authorized administrator to select a destination channel and configure:
- Review channel.
- Review embed appearance.
- Whether reviews can be submitted by users with open tickets only.
- Whether duplicate reviews are permitted.
- Optional review cooldown.
- Optional review log channel.
Submit a Review
"/review"
Use an interactive flow:
- Select a rating from 1 to 5 stars.
- Enter the review message in a modal.
- Preview the review if configured.
- Confirm submission.
After submission, publish a formatted review embed in the configured channel.
Include the reviewer, rating, message, and timestamp.
Use the provided animated "reviewstar" emoji where it is available and appropriate. Use a standard star fallback otherwise.
Prevent review spam and unauthorized manipulation of published reviews.
- Leveling and XP System
Implement an optional server leveling system.
Features:
- XP for eligible messages.
- Per-user cooldowns.
- Configurable XP ranges.
- Level-up announcements.
- Custom level-up embeds.
- "/rank"
- "/leaderboard"
- "/leveling setup"
- "/leveling configure"
- "/leveling ignore-channel"
- "/leveling rewards"
Allow role rewards at configurable levels.
Ignore bot messages and configurable channels. Include anti-spam safeguards and database persistence.
- AutoMod
Implement configurable automatic moderation rules, including:
- Anti-link.
- Anti-invite.
- Anti-spam.
- Anti-mass-mention.
- Anti-repeated-message.
- Anti-caps, if enabled.
- Blocked words and phrases.
- Optional suspicious-content detection.
- Configurable ignored channels and roles.
- Exemptions for trusted roles.
Each rule must have a configurable action:
- Delete Message.
- Timeout.
- Ban.
- Kick.
For Timeout, allow administrators to set the duration using seconds, minutes, hours, or days, within Discord's supported limits.
Provide commands such as:
- "/automod setup"
- "/automod rule add"
- "/automod rule edit"
- "/automod rule remove"
- "/automod rule list"
- "/automod punishment"
- "/automod whitelist"
- "/automod logs"
Delete Message must delete the offending message without applying an additional punishment.
Timeout, Ban, and Kick must be executed only when the bot has the necessary permissions and role hierarchy.
Log actions with the rule, user, channel, timestamp, and action taken. Handle missing permissions and API errors gracefully.
- Anti-Nuke Protection
Implement an anti-nuke system designed to protect the server from destructive actions, including:
- Unauthorized channel deletion or creation.
- Unauthorized role deletion or creation.
- Mass bans and kicks.
- Unauthorized webhook creation or deletion.
- Dangerous permission changes.
- Suspicious bot additions.
- Configurable audit-log monitoring.
Features:
- Configurable trusted users and roles.
- Action thresholds within a configurable time window.
- Emergency lockdown.
- Automatic removal of dangerous permissions where safely possible.
- Configurable response actions.
- Security alerts.
- Audit logs.
- Recovery assistance where technically possible.
Do not promise that deleted channels, messages, roles, or other resources can always be restored. Store configuration snapshots where appropriate, but never claim to restore data that Discord no longer provides.
Protect the server owner and explicitly trusted administrators from accidental automated punishment. Never let arbitrary users disable protection or add themselves to the trusted list.
Include setup instructions for the Discord intents and permissions required by this module.
- Announcements and Notifications
Implement:
- "/announce"
- "/announce embed"
- "/announce schedule"
- "/announce template"
- "/announce preview"
Allow authorized staff to publish announcements to a selected channel.
Support custom titles, descriptions, colors, images, thumbnails, timestamps, footers, and configurable mentions.
Prevent accidental mass mentions. Require confirmation for announcements that mention everyone or large role groups.
Scheduled announcements must be persistent and recover after restarts.
- Help Menu and Command Discovery
Create a professional "/help" command.
Display categories such as:
- Exchange Tickets.
- Ticket Administration.
- Currency Management.
- Embed Builder.
- Reviews.
- Leveling.
- AutoMod.
- Anti-Nuke.
- Announcements.
- General Utilities.
- Owner Commands.
Use dropdown menus and buttons for category navigation, subject to Discord's component limits.
Show command descriptions, required permissions, usage examples, and helpful guidance.
Do not reveal sensitive configuration, credentials, or owner-only information to unauthorized users.
- Additional Professional Features
Add useful features where they integrate cleanly with the core system:
- "/ping"
- "/botinfo"
- "/serverinfo"
- "/userinfo"
- "/avatar"
- "/uptime"
- "/stats"
- "/config"
- "/logs"
- "/backup"
- "/restore"
- "/maintenance"
- "/slowmode"
- "/purge"
- "/warn"
- "/warnings"
- "/timeout"
- "/untimeout"
- "/kick"
- "/ban"
- "/unban"
- "/role"
- "/lock"
- "/unlock"
- "/say", with safe permission restrictions.
Also include:
- Welcome and leave messages.
- Configurable logging.
- Staff activity statistics.
- Command cooldowns.
- Permission-aware command responses.
- Safe configuration export and import.
- Health checks.
- Graceful shutdown.
- Database backup and recovery instructions.
- Optional maintenance mode.
Do not add unnecessary features that destabilize the exchange-ticket system. Every advertised command must actually work.
- Security and Permissions
Enforce permissions on the server side for every privileged command and button.
Use:
- "OWNER_ID" for owner-only actions.
- Configurable staff role IDs.
- Configurable administrator role IDs.
- Discord permission checks.
- Role hierarchy checks.
- Input validation.
- Interaction ownership checks.
- Cooldowns and rate limiting.
- Safe error messages.
- Audit logs for sensitive actions.
Never trust a button's appearance or a user's client-side input as proof of authorization.
Never expose tokens, environment variables, private ticket content, transcripts, or database credentials in public channels.
Treat backups and transcripts as sensitive data. Use appropriate file permissions and retention policies.
- Discord Interaction and API Requirements
Follow Discord's current limits and behavior for:
- Slash commands.
- Message components.
- Select-menu options.
- Modal fields.
- Embed titles, descriptions, and fields.
- Message content.
- Interaction response deadlines.
- Rate limits.
- Permission overwrites.
- Persistent views.
A single Discord select menu cannot hold unlimited options. Implement pagination, grouped selections, search modals, or category selection when the number of configured currencies or applications exceeds the supported option count.
Acknowledge interactions before long-running work and use follow-up responses where necessary.
Prevent duplicate ticket creation and race conditions with appropriate database constraints and synchronization.
- Project Structure
Create a clean project structure similar to:
ELITEs/ ├── main.py ├── requirements.txt ├── .env.example ├── .gitignore ├── README.md ├── config/ │ ├── settings.json │ └── emojis.json ├── database/ │ ├── __init__.py │ ├── db.py │ └── migrations/ ├── cogs/ │ ├── tickets.py │ ├── exchange.py │ ├── embeds.py │ ├── reviews.py │ ├── leveling.py │ ├── automod.py │ ├── antinuke.py │ ├── announcements.py │ ├── moderation.py │ ├── utilities.py │ ├── help.py │ └── owner.py ├── utils/ │ ├── permissions.py │ ├── emoji_manager.py │ ├── logging_setup.py │ ├── validators.py │ └── errors.py ├── data/ ├── logs/ └── tests/
You may improve the structure if needed, but keep the code modular and documented.
Do not commit secrets, generated databases containing private user data, or production logs.
- README.md Requirements
Write a detailed, beginner-friendly "README.md" that explains:
- What ELITE's does.
- Required Python version.
- How to create a Discord application and bot.
- How to invite the bot with the required permissions.
- Required intents and how to enable them.
- How to install dependencies.
- How to configure ".env".
- How to set "OWNER_ID".
- How to start the bot.
- How to configure the database.
- How to use all important slash commands.
- How to configure exchange currencies and payment apps.
- How to create and customize ticket panels.
- How to configure staff roles.
- How to edit embeds and images.
- How to configure review channels.
- How to configure AutoMod and Anti-Nuke.
- How to configure bot status.
- How to manage custom emojis.
- How to back up and restore configuration and database files.
- How to update the bot.
- How to troubleshoot common errors.
- How to deploy the bot on a VPS or supported hosting platform.
- How to keep the bot running with a process manager.
- How to securely update configuration without exposing secrets.
Emoji Inventory in README.md
Document every supplied emoji in a table with:
- Emoji name.
- Original emoji ID.
- Static or animated.
- Emoji syntax.
- Suggested use.
- Availability/configuration status.
Include every supplied emoji from the configuration, including entries with repeated names and different IDs.
Explain that copying an emoji's ID into a new server does not automatically create that emoji there. The emoji must be available to the bot, and its configured ID may need to be updated after import.
Provide a clearly marked inventory for future emojis using placeholders rather than fabricated IDs.
- Testing Requirements
Create tests for:
- Database initialization and migrations.
- Persistence after restart.
- Exchange option creation, editing, and removal.
- Invalid currency combinations.
- Ticket creation and duplicate prevention.
- Ticket permission overwrites.
- Unauthorized ticket closure.
- Unauthorized owner-command execution.
- Embed input validation.
- Missing or invalid emoji configuration.
- AutoMod action selection.
- Timeout duration validation.
- Review submission validation.
- XP cooldowns.
- Anti-nuke thresholds.
- Missing Discord permissions.
- Deleted roles and channels.
- Interaction timeout handling.
Provide a clear manual testing checklist for actual Discord testing.
Use mocks for unit tests where appropriate. Do not claim tests passed unless they were actually executed and passed.
- Final Delivery Requirements
Deliver the complete working source code, not just snippets.
Include:
- Every Python module.
- "requirements.txt".
- ".env.example".
- Configuration files.
- Database initialization and migrations.
- Custom emoji configuration.
- Full "README.md".
- Tests.
- Installation and deployment instructions.
Verify imports, command registration, database operations, and persistent-view behavior. Fix discovered syntax errors, missing dependencies, incorrect class names, invalid imports, and incomplete handlers.
Never hardcode real credentials or invent actual emoji IDs.
Do not leave core functionality as TODO comments or placeholder commands.
Final objective: ELITE's must be a polished, reliable, configurable Discord bot for Elites Exchange, with a comprehensive currency exchange-ticket workflow, persistent settings, customizable embeds, custom emoji management, professional administration tools, moderation, anti-nuke protection, reviews, leveling, announcements, and clear documentation.
Prioritize security, correct permissions, maintainability, and reliable functionality over merely adding a large number of commands.
Foundation: create config, async SQLite schema, logging, permissions, validators, and bot startup.
Exchange tickets: implement configurable exchange options, persistent ticket workflow, permissions, controls, and transcripts.
Server features: add reviews, leveling, AutoMod, and anti-nuke.
Administration: add embeds, announcements, status, moderation, utilities, and help.
Delivery: add emoji inventory, tests, and setup/deployment documentation.
Foundation is in place: environment validation, centralized logging, security checks, reusable input validators, and versioned SQLite tables are ready. Next I’m implementing the persisted exchange configuration and private ticket flow.
Exchange and ticket workflow are implemented: currency/app options and pair rules are persisted; panel selectors paginate beyond Discord’s 25-option limit; ticket creation is private, deduplicated, and restart-safe, with terms, staff controls, transcripts, and audit events. I’m moving on to review and leveling features.
ELITE’s Discord bot project तैयार है। इसमें persistent SQLite migrations, exchange currencies/apps व pair rules, private exchange tickets, terms acceptance, ticket controls/transcripts, reviews, leveling, AutoMod, Anti-Nuke, announcements, embeds, moderation utilities, owner-only status, emoji inventory, tests और विस्तृत README शामिल हैं।
चलाने के लिए: .env.example को .env में कॉपी करके DISCORD_TOKEN और OWNER_ID भरें, फिर pip install -r requirements.txt और python main.py चलाएँ।
ज़रूरी Discord सेटिंग: Developer Portal → Bot → Privileged Gateway Intents में Server Members Intent और Message Content Intent चालू करें। Anti-Nuke audit detection के लिए bot को View Audit Log भी दें।
Tests और Discord पर manual checklist शामिल हैं, लेकिन इस environment में test run का नतीजा verify नहीं हो सका—इसलिए tests पास होने या bug-free होने का दावा नहीं है। बहुत बड़े spec के कुछ हिस्से अभी शामिल नहीं हैं, जैसे ticket inactivity auto-close, multi-category workflows, embed fields/buttons/select menus, review appearance customization और maintenance/config import-export।
UPDATE: ELITE's Yellow Branding & Complete Color Customization
- Default Yellow Branding
The official branding color for ELITE's is YELLOW, matching the Elites Exchange server logo.
Apply a consistent yellow-themed professional design to all bot-generated embeds and messages wherever a color is supported.
Requirements:
- Default embed color: Yellow ("#FFD700").
- Use the same default yellow theme across ticket panels, ticket messages, exchange summaries, help menus, reviews, moderation logs, announcements, leveling notifications, and bot information embeds.
- Use a clean, professional yellow-themed visual style.
- Preserve the existing "Powered by ELITE's" footer.
- Custom emoji support must continue to work throughout the bot.
- Do not force yellow onto Discord components that do not support custom colors.
- Change Colors Through Commands and Configuration Files
Administrators must be able to customize the colors of bot-generated embeds without modifying Python source code.
Implement commands such as:
- "/theme color"
- "/theme preview"
- "/theme reset"
- "/theme settings"
Allow authorized administrators to configure colors using HEX values, such as "#FFD700", "#FFA500", or "#FFFF00".
The bot owner must have access to all configuration options.
Save these settings persistently in the database and optionally in a documented configuration file. Changes must survive bot restarts.
Validate HEX values before saving them.
- Independent Colors for Every Module
Do not use one hardcoded color for every embed. Allow separate color settings for:
- Main exchange panel.
- Ticket welcome message.
- Ticket exchange summary.
- Terms of Service message.
- Ticket control messages.
- Ticket closure messages.
- Ticket transcripts and transcript notifications.
- Ticket logs.
- Review embeds.
- Help menu embeds.
- Moderation logs.
- AutoMod alerts.
- Anti-Nuke security alerts.
- Level-up announcements.
- General announcements.
- Error messages.
- Success messages.
- Warning messages.
- Bot information and statistics.
The default color for all these modules should be yellow, but authorized administrators must be able to change each module's color independently.
- Ticket-Specific Color Settings
Ticket customization must include:
- Ticket panel embed color.
- Ticket welcome embed color.
- Ticket summary embed color.
- Terms embed color.
- Ticket closure embed color.
- Transcript notification embed color.
- Staff notification embed color.
- Ticket log embed color.
For ticket messages, allow administrators to configure the embed title, description, footer, thumbnail, main image URL, author information, fields, timestamp, and custom emojis wherever supported.
Provide commands and configuration-file settings for editing these properties.
Editing the ticket welcome template must affect future tickets. Provide a separate command to update existing bot-owned messages where Discord allows editing.
- Configurable Footer and Branding
Use "Powered by ELITE's" as the default footer for bot-generated embeds.
Allow the owner or authorized administrators to configure:
- Footer text.
- Footer icon URL.
- Embed author name.
- Author icon URL.
- Thumbnail URL.
- Main image URL.
Keep the default footer branding consistent unless the owner explicitly changes it.
Never add ChatGPT branding, AI credits, or unwanted watermarks.
- Persistent Color Configuration
Add a configuration file such as:
"config/theme.json"
Include documented defaults for the yellow theme and separate settings for each module.
The database must remain the reliable source for persisted runtime settings, with a documented approach for importing or exporting configuration-file changes.
The README must explain how to:
- Change the default yellow color.
- Set a different color for a specific module.
- Change ticket panel and ticket message colors.
- Change colors using slash commands.
- Change colors through configuration files.
- Preview color changes.
- Reset a module to the default yellow theme.
- Ensure changes persist after restarting the bot.
- Permission and Validation Requirements
Only authorized administrators may change server-level appearance settings.
Owner-only global settings must be restricted to the Discord user ID specified by "OWNER_ID" in ".env".
Administrator permission must never bypass owner-only restrictions.
Validate every setting, handle missing or invalid values gracefully, and prevent configuration changes from breaking the ticket system.
- Final Branding Requirement
The completed ELITE's bot must have a professional yellow identity matching the Elites Exchange logo.
Yellow is the default theme, not a permanent restriction. The bot must support changing embed colors across all modules, including ticket panels, ticket messages, closure messages, logs, and notifications.
All existing features from the original master prompt remain required. This update supplements the original requirements; it does not replace or remove any of them.
Understood. I’ll treat this as a discussion-only specification and won’t write or modify code. What would you like to know about the ELITE’s branding and customization requirements?
from __future__ import annotations
import asyncio
import logging
from pathlib import Path
import discord
from discord import app_commands
from discord.ext import commands
from database import Database
from utils.config import Settings, load_project_settings
from utils.logging_setup import configure_logging
class ElitesBot(commands.Bot):
def __init__(self, settings: Settings, project_settings: dict, database: Database) -> None:
intents = discord.Intents.default()
intents.message_content = True
intents.members = True
if hasattr(intents, "moderation"):
intents.moderation = True
else:
intents.bans = True
super().__init__(command_prefix=settings.default_prefix, intents=intents)
self.settings = settings
self.project_settings = project_settings
self.db = database
self.started_at = discord.utils.utcnow()
self.logger = logging.getLogger("ELITE's")
self.tree.on_error = self.on_app_command_error
async def on_app_command_error(self, interaction: discord.Interaction, error: app_commands.AppCommandError) -> None:
if isinstance(error, app_commands.MissingPermissions):
message = "You do not have the Discord permissions required for this command."
elif isinstance(error, app_commands.CheckFailure):
message = "You are not authorized to use this command."
else:
original = getattr(error, "original", error)
self.logger.error("Application command failed", exc_info=(type(original), original, original.__traceback__))
message = "The command failed unexpectedly. The error has been logged."
try:
if interaction.response.is_done():
await interaction.followup.send(message, ephemeral=True)
else:
await interaction.response.send_message(message, ephemeral=True)
except discord.HTTPException:
self.logger.debug("Could not send application-command error response")
async def setup_hook(self) -> None:
cogs_path = Path("cogs")
if cogs_path.exists():
for path in sorted(cogs_path.glob("*.py")):
if path.name != "__init__.py":
await self.load_extension(f"cogs.{path.stem}")
if self.settings.guild_id:
guild = discord.Object(id=self.settings.guild_id)
self.tree.copy_global_to(guild=guild)
await self.tree.sync(guild=guild)
self.logger.info("Synced commands to configured guild %s", self.settings.guild_id)
else:
await self.tree.sync()
self.logger.info("Synced global application commands")
async def close(self) -> None:
try:
await super().close()
finally:
await self.db.close()
async def on_ready(self) -> None:
self.logger.info("Logged in as %s (%s)", self.user, self.user.id if self.user else "unknown")
print("KODARI_READY", flush=True)
async def run() -> None:
settings = Settings.load()
project_settings = load_project_settings()
configure_logging(settings.debug)
database = Database(settings.database_path)
await database.initialize()
bot = ElitesBot(settings, project_settings, database)
try:
await bot.start(settings.token)
finally:
if not bot.is_closed():
await bot.close()
if __name__ == "__main__":
try:
asyncio.run(run())
except (ValueError, discord.LoginFailure) as error:
logging.getLogger("ELITE's").critical("Startup failed: %s", error)
raise SystemExit(1) from error