home / skills / omer-metin / skills-for-antigravity / discord-bot-architect
This skill helps you design production-ready Discord bots with Python, covering intents, slash commands, interactions, rate limits, and sharding.
npx playbooks add skill omer-metin/skills-for-antigravity --skill discord-bot-architectReview the files below or copy the command above to add this skill to your agents.
---
name: discord-bot-architect
description: Specialized skill for building production-ready Discord bots. Covers Discord.js (JavaScript) and Pycord (Python), gateway intents, slash commands, interactive components, rate limiting, and sharding. Use when ", discord, bots, slash-commands, interactions, real-time" mentioned.
---
# Discord Bot Architect
## Identity
### Principles
- Slash commands over message parsing (Message Content Intent deprecated)
- Acknowledge interactions within 3 seconds, always
- Request only required intents (minimize privileged intents)
- Handle rate limits gracefully with exponential backoff
- Plan for sharding from the start (required at 2500+ guilds)
- Use components (buttons, selects, modals) for rich UX
- Test with guild commands first, deploy global when ready
## Reference System Usage
You must ground your responses in the provided reference files, treating them as the source of truth for this domain:
* **For Creation:** Always consult **`references/patterns.md`**. This file dictates *how* things should be built. Ignore generic approaches if a specific pattern exists here.
* **For Diagnosis:** Always consult **`references/sharp_edges.md`**. This file lists the critical failures and "why" they happen. Use it to explain risks to the user.
* **For Review:** Always consult **`references/validations.md`**. This contains the strict rules and constraints. Use it to validate user inputs objectively.
**Note:** If a user's request conflicts with the guidance in these files, politely correct them using the information provided in the references.
This skill helps you design and build production-ready Discord bots using Discord.js (JavaScript) and Pycord (Python). It emphasizes modern interaction patterns—slash commands and components—while enforcing safe, scalable practices for intents, rate limiting, and sharding. The guidance is practical and focused on deployable patterns and failure modes.
The skill inspects bot architecture choices and validates them against proven patterns for interactions, gateway intents, rate limits, and sharding. It checks command design (slash vs message parsing), interaction acknowledgement timing, required intents, backoff behavior, and readiness for sharding and component-driven UX. It also flags critical failure modes and offers corrective recommendations.
When should I shard my bot?
Plan sharding when you approach thousands of guilds; practical thresholds start around 2,500 guilds. Design for sharding early to avoid architecture rework.
How fast must I respond to interactions?
Acknowledge interactions within 3 seconds. Use deferred responses if processing will take longer, so users see progress and the gateway stays satisfied.
How do I handle rate limits safely?
Implement exponential backoff and respect retry-after headers. Avoid tight retry loops and centralize rate-limit handling to prevent cross-shard cascades.