π
1 file
13,678 chars
π
pasted-code-1791527697901.txt
txt
423 lines
βΆ
pasted-code-1791527697901.txt
txt
423 lines
# MASTER PROMPT β BUILD A COMPLETE PURIFY-STYLE DISCORD BOT
You are an expert Python developer specializing in Discord bots, discord.py, Discord slash commands, interactive components, databases, moderation systems, and professional Discord bot interfaces.
## 1. MAIN OBJECTIVE
Build a complete, production-quality Discord bot inspired by the functionality and user experience of Purify-style multipurpose Discord bots.
Reference website:
https://exhale.best/commands
First, inspect the reference website and its command documentation. Identify every publicly documented command, command category, alias, option, permission requirement, description, and available feature.
Do not stop after documenting only the first page. Check all command categories, pagination, and relevant linked documentation that is publicly accessible.
Create an implementation checklist containing every discovered command. Implement as many as are documented and technically feasible. Do not claim a command is implemented until its code actually works.
Use the reference for functional inspiration. Create original code, original descriptions, and an original bot identity rather than copying proprietary source code or assets.
If the website is inaccessible, ask me to provide its command list or screenshots. Do not fabricate commands and pretend they came from the website.
## 2. TECHNOLOGY STACK
Use:
* Python 3.12 or a compatible supported Python version.
* discord.py 2.x.
* Discord application commands and slash commands.
* Prefix commands using `,`.
* SQLite for persistent storage.
* `aiosqlite` for asynchronous database access.
* `python-dotenv` for local environment variables.
* `aiohttp` when HTTP requests are required.
* Modular Python files organized by feature.
* Discord embeds, buttons, select menus, modals, and persistent views where appropriate.
Make the bot compatible with legitimate hosting services that support Python applications.
## 3. COMMAND DISCOVERY AND COMPLETENESS
Inspect https://exhale.best/commands and build a complete command inventory.
For every command, record:
* Command name.
* Aliases.
* Category.
* Description.
* Required arguments.
* Optional arguments.
* Default values.
* Required Discord permissions.
* Bot permissions.
* Example usage.
* Expected response.
* Whether it is a prefix command, slash command, or both.
Organize the discovered commands into appropriate categories, preserving the website's documented categories where practical.
Do not skip commands simply because they are repetitive. Implement each command using reusable functions where possible.
Create a `COMMANDS.md` file documenting the full inventory, implementation status, syntax, arguments, aliases, permissions, and examples.
## 4. COMMAND CATEGORIES
Inspect the source documentation first, then implement all documented features that are appropriate for the bot.
Include applicable features from these categories:
### General
* Help.
* Ping and latency.
* Bot information.
* Server information.
* User information.
* Avatar.
* Invite link.
* Uptime.
* Server and member statistics.
* Role information.
* Channel information.
* Permissions information.
### Moderation
* Ban and unban.
* Kick.
* Timeout and remove timeout.
* Purge messages.
* Clear a user's messages when permitted.
* Lock and unlock channels.
* Slowmode.
* Change nicknames.
* Add and remove roles.
* Warn and manage warnings.
* Warning history.
* Moderation logs.
* Moderation reasons.
* Moderation history.
* Bulk moderation actions with permission checks and sensible limits.
### Server configuration
* Welcome and goodbye messages.
* Welcome embeds.
* Autoroles.
* Logging configuration.
* Join and leave logs.
* Message edit and delete logs.
* Member role update logs.
* Configurable prefixes.
* Custom command aliases.
* Auto responses.
* Ignored channels and roles.
* Per-server settings.
### Community and social
* Polls.
* Suggestions.
* User statistics.
* Server statistics.
* User profiles.
* AFK status.
* Reminders.
* Custom embeds.
* Feedback systems.
* Frequently asked questions.
* Fun commands.
* Other documented community features.
### Tickets and support
* A `/ticket setup` command or equivalent setup workflow.
* A persistent button panel with a Create Ticket button.
* A private channel for each ticket.
* Access for the ticket creator and authorized support staff only.
* Configurable ticket categories and staff roles.
* Ticket claim, close, reopen, and delete actions.
* Ticket transcripts.
* Close confirmation.
* Ticket logs.
* Protection against duplicate open tickets.
* Persistent buttons that continue working after bot restarts.
Ticket permissions must be configured so ordinary server members cannot view another user's private ticket. Only the ticket owner, authorized staff, and explicitly configured administrators should have access.
### Security and server protection
* Anti-spam.
* Anti-raid safeguards.
* Anti-link filtering.
* Invite-link filtering.
* Configurable blocked-word filters.
* Rate limits.
* Permission-change logging.
* Configurable moderation safeguards.
* Role and channel protection with strict authorization checks.
Never create hidden surveillance, credential theft, keylogging, token collection, or covert data collection features. Security features should protect the server transparently and use Discord's supported APIs.
### Utility and administration
* Server setup tools.
* Role and channel utilities.
* Embed builder.
* Poll creation.
* Scheduled announcements.
* Configuration commands.
* Database-backed settings.
* Other appropriate utilities found in the reference documentation.
This list is a starting point, not a substitute for the complete command inventory.
## 5. PROFESSIONAL COMMAND DESIGN
Make the bot feel polished and consistent.
Use embeds with:
* A consistent original color palette.
* Clear titles.
* Useful descriptions.
* Properly formatted fields.
* Timestamps when useful.
* Footer text and bot branding.
* Appropriate success, warning, error, and information styling.
Use buttons and select menus when they improve usability.
For commands with many options, use slash-command options, autocomplete, or Discord modals where suitable.
Every command should provide a useful response. Do not implement commands that merely say "Coming soon" while claiming they work.
## 6. HELP COMMAND
Create a polished help interface.
The help command should:
* Display command categories.
* Use buttons or a select menu to navigate categories.
* Show the commands available in the selected category.
* Include short descriptions.
* Provide command syntax and usage examples.
* Show aliases.
* Provide individual command help.
* Respect permissions and server-specific configuration.
* Avoid listing commands that do not actually exist.
Include support for both `/help` and `,help` where technically appropriate.
## 7. PREFIX AND SLASH COMMANDS
The default prefix must be:
`,`
Examples:
* `,help`
* `,ping`
* `,userinfo @member`
Implement slash-command equivalents where appropriate.
Ensure slash commands synchronize correctly. Avoid duplicate command registration and global synchronization on every single event.
Provide a reliable development mode for quickly testing commands in a designated test server, followed by a documented production synchronization process.
## 8. DATABASE
Use SQLite with asynchronous access.
Persist:
* Server configuration.
* Prefixes.
* Warning records.
* Moderation history.
* Autoroles.
* AFK statuses.
* Auto responses.
* Aliases.
* Ticket configuration.
* Open ticket records.
* Ticket claims and transcripts where appropriate.
* Logging configuration.
* Anti-spam and anti-link settings.
* Other configuration required by implemented commands.
Create database tables automatically when the bot starts.
Use parameterized SQL queries. Handle missing records, database errors, and concurrent access correctly.
Do not rely on in-memory dictionaries for information that must survive a restart.
## 9. PERMISSIONS AND SECURITY
Implement strict permission checks.
For moderation commands:
* Verify the user's permissions.
* Verify the bot's permissions.
* Check role hierarchy.
* Prevent unauthorized administrators or members from executing restricted commands.
* Validate all command arguments.
* Handle missing permissions gracefully.
* Record moderation actions when logging is configured.
Do not expose the bot token, environment variables, database credentials, or private configuration in logs or command responses.
Never hardcode the bot token in source code.
Use an environment variable named `BOT_TOKEN`, loaded from the hosting provider's secret/environment-variable settings.
For local development, use a `.env` file that is excluded from version control.
## 10. ERROR HANDLING
Implement:
* Missing-argument errors.
* Invalid-user and invalid-role errors.
* Missing-permission errors.
* Cooldowns.
* Rate limiting.
* Discord API error handling.
* Database error handling.
* Interaction expiration handling.
* Duplicate command handling.
* Graceful shutdown and restart behavior.
Prevent unhandled exceptions from silently breaking commands.
Use structured logging and never log secrets.
## 11. PROJECT STRUCTURE
Use a modular structure similar to:
discord-bot/
βββ main.py
βββ config.py
βββ database.py
βββ requirements.txt
βββ .env.example
βββ .gitignore
βββ README.md
βββ COMMANDS.md
βββ cogs/
β βββ general.py
β βββ moderation.py
β βββ utility.py
β βββ community.py
β βββ tickets.py
β βββ automod.py
β βββ logging.py
β βββ configuration.py
βββ utils/
β βββ embeds.py
β βββ checks.py
β βββ permissions.py
β βββ helpers.py
βββ data/
You may improve this structure if necessary, but keep each feature organized and maintainable.
## 12. DISCORD BOT SETUP
Explain how to configure the Discord Developer Portal.
Document:
* Creating the application.
* Creating the bot user.
* Setting required privileged gateway intents.
* Enabling only the intents actually needed.
* Generating an OAuth2 invite URL.
* Selecting the `bot` and `applications.commands` scopes.
* Selecting the minimum necessary bot permissions.
* Inviting the bot to a server.
* Configuring `BOT_TOKEN`.
* Starting the application.
* Checking logs and troubleshooting startup errors.
Never ask me to paste my real bot token into chat.
## 13. HOSTING
Make the project suitable for hosting platforms that support long-running Python processes.
Provide:
* Dependency installation instructions.
* Startup command.
* Environment-variable configuration.
* Persistent storage requirements for SQLite.
* Restart handling.
* Health and uptime logging.
* Clear instructions for deploying updates.
Do not claim that any free hosting plan guarantees 24/7 uptime. Explain relevant hosting limits accurately.
## 14. TESTING REQUIREMENTS
Before declaring the bot complete:
* Check Python syntax.
* Verify every imported module exists.
* Verify all cogs load.
* Verify all commands register correctly.
* Verify aliases work.
* Verify permission checks.
* Verify database initialization.
* Verify database persistence across restarts.
* Verify ticket channel privacy.
* Verify persistent ticket buttons after restarting.
* Verify command responses and error handling.
* Check for duplicate command names and missing implementations.
Create a checklist that shows which commands have passed testing and which still need testing in a real Discord server.
Never claim to have tested live Discord behavior if you only performed static code checks.
## 15. HOW TO DELIVER THE CODE
Work in phases:
PHASE 1: Inspect the reference website and create the complete command inventory.
PHASE 2: Design the architecture and database.
PHASE 3: Implement the bot foundation, configuration, and error handling.
PHASE 4: Implement all documented commands by category.
PHASE 5: Implement the help interface, embeds, buttons, and interactive components.
PHASE 6: Implement tickets, security features, and server configuration.
PHASE 7: Run checks and fix errors.
PHASE 8: Provide deployment instructions and a final command checklist.
If you can create files directly, produce the complete project as downloadable files or a ZIP archive.
If you can only respond with text, provide each complete file in a separate code block with its exact filename. Do not omit code with placeholders such as "# add the remaining commands here."
If the entire project is too large for one response, divide it into clearly numbered parts and maintain a checklist of completed files. Continue from the last completed file instead of restarting or repeating the project.
## FINAL REQUIREMENT
I want a working, feature-rich Discord bot with a complete command system, professional embeds, interactive help menus, persistent settings, private support tickets, moderation, logging, and configuration.
The reference website is the source for discovering the documented commands. Verify the list before implementing it.
Prioritize correctness, security, maintainability, and real functionality over simply generating a large amount of code.
Start with Phase 1 and show me the discovered command inventory before proceeding.
KodariOct 9 at 6:35 am 1
PurifyDiscordBot
A comprehensive Purify-style Discord bot featuring slash and prefix commands, modular cogs for moderation, tickets, community, and configuration, SQLite persistence, interactive embeds and buttons, strict permission checks, anti-spam safeguards, and a polished help interface with category navigation.
https://exhale.best/commands returned HTTP 200, but no readable command documentation was available to inspect. I canβt produce a reliable inventory without guessing. Please share the command list, screenshots, or a documentation export, and Iβll continue with Phase 1.
Kodari can make mistakes. Review important code before using.
Files
No files in this session
Code