Discord Bot Architect workflow skill. Use this skill when the user needs Specialized skill for building production-ready Discord bots and the operator should preserve the upstream workflow, copied support files, and provenance before merging or handing off.
Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.
Quelldateien prüfen
Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
Discord Bot Architect workflow skill. Use this skill when the user needs Specialized skill for building production-ready Discord bots and the operator should preserve the upstream workflow, copied support files, and provenance before merging or handing off.
This public intake copy packages plugins/antigravity-awesome-skills-claude/skills/discord-bot-architect from https://github.com/sickn33/antigravity-awesome-skills into the native Omni Skills editorial shape without hiding its origin.
Use it when the operator needs the upstream workflow, support files, and repository context to stay intact while the public validator and private enhancer continue their normal downstream flow.
This intake keeps the copied upstream files intact and uses metadata.json plus ORIGIN.md as the provenance anchor for review.
Discord Bot Architect 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.
Imported source sections that did not map cleanly to the public headings are still preserved below or in the support files. Notable imported sections: Patterns, Sharp Edges, For components (buttons, menus), Avoid Message Content Intent if possible, Use a separate deploy script (not on startup), Never hardcode tokens.
When to Use This Skill
Use this section as the trigger filter. It should make the activation boundary explicit before the operator loads files, runs commands, or opens a pull request.
Use this skill when the request clearly matches the capabilities and patterns described above.
Use when the request clearly matches the imported source intent: Specialized skill for building production-ready Discord bots.
Use when the operator should preserve upstream workflow detail instead of rewriting the process from scratch.
Use when provenance needs to stay visible in the answer, PR, or review packet.
Use when copied upstream references, examples, or scripts materially improve the answer.
Use when the workflow should remain reviewable in the public intake repo before the private enhancer takes over.
Operating Table
Situation
Start here
Why it matters
First-time use
metadata.json
Confirms repository, branch, commit, and imported path before touching the copied workflow
Provenance review
ORIGIN.md
Gives reviewers a plain-language audit trail for the imported source
Workflow execution
SKILL.md
Starts with the smallest copied file that materially changes execution
Supporting context
SKILL.md
Adds the next most relevant copied source file without loading the entire package
Handoff decision
## Related Skills
Helps the operator switch to a stronger native skill when the task drifts
Workflow
This workflow is intentionally editorial and operational at the same time. It keeps the imported source useful to the operator while still satisfying the public intake standards that feed the downstream enhancer flow.
Use guild commands during development (instant updates)
Only deploy global commands when ready for production
Imported Workflow Notes
Imported: Acknowledge immediately, process later
// Discord.js - Defer for slow operationsmodule.exports = {
asyncexecute(interaction) {
// DEFER IMMEDIATELY - before any slow operationawait interaction.deferReply();
// For ephemeral: await interaction.deferReply({ ephemeral: true });// Now you have 15 minutesconst result = awaitslowDatabaseQuery();
const aiResponse = awaitcallLLM(result);
// Edit the deferred replyawait interaction.editReply(`Result: ${aiResponse}`);
}
};
# Pycord@bot.slash_command()asyncdefslow_command(ctx):
await ctx.defer() # Acknowledge immediately# await ctx.defer(ephemeral=True) # For private response
result = await slow_operation()
await ctx.followup.send(f"Result: {result}")
Imported: Step 1: Enable in Developer Portal
1. Go to https://discord.com/developers/applications
2. Select your application
3. Go to Bot section
4. Scroll to Privileged Gateway Intents
5. Toggle ON the intents you need
Use guild commands during development (instant updates)
Only deploy global commands when ready for production
Run deploy script manually, not on every restart
Bot Token Exposed
Severity: CRITICAL
Situation: Storing or sharing bot token
Symptoms:
Unauthorized actions from your bot.
Bot joins random servers.
Bot sends spam or malicious content.
"Invalid token" after Discord invalidates it.
Why this breaks:
Your bot token provides FULL control over your bot. Attackers can:
Send messages as your bot
Join servers, create invites
Access all data your bot can access
Potentially take over servers where bot has admin
Discord actively scans GitHub for exposed tokens and invalidates them.
Common exposure points:
Committed to Git
Shared in Discord itself
In client-side code
In public screenshots
Recommended fix:
Imported: Workflow
Develop and test with guild commands (instant)
When ready, deploy global commands
Wait up to 1 hour for propagation
Don't deploy global commands frequently
Frequent Gateway Disconnections
Severity: MEDIUM
Situation: Bot randomly goes offline or misses events
Symptoms:
Bot shows as offline intermittently.
Events are missed (member joins, messages).
Reconnection messages in logs.
Why this breaks:
Discord gateway requires regular heartbeats. Issues:
Blocking operations prevent heartbeat
Network instability
Memory pressure causing GC pauses
Too many guilds without sharding (2500+ requires sharding)
Recommended fix:
Imported: Patterns
Discord.js v14 Foundation
Modern Discord bot setup with Discord.js v14 and slash commands
When to use: Building Discord bots with JavaScript/TypeScript,Need full gateway connection with events,Building bots with complex interactions
# Pycord - AutoShardedBotimport discord
from discord.ext import commands
# Automatically handles sharding
bot = commands.AutoShardedBot(
command_prefix="!",
intents=discord.Intents.default(),
shard_count=None# Auto-determine
)
@bot.eventasyncdefon_ready():
print(f"Logged in on {len(bot.shards)} shards")
for shard_id, shard in bot.shards.items():
print(f"Shard {shard_id}: {shard.latency * 1000:.2f}ms")
@bot.eventasyncdefon_shard_ready(shard_id):
print(f"Shard {shard_id} is ready")
# Get guilds per shardfor shard_id, guilds in bot.guilds_by_shard().items():
print(f"Shard {shard_id}: {len(guilds)} guilds")
Scaling_guide
1-2500 guilds: No sharding required
2500+ guilds: Sharding required by Discord
Recommended: ~1000 guilds per shard
Memory: Each shard runs in separate process
Examples
Example 1: Ask for the upstream workflow directly
Use @discord-bot-architect to handle <task>. Start from the copied upstream workflow, load only the files that change the outcome, and keep provenance visible in the answer.
Explanation: This is the safest starting point when the operator needs the imported workflow, but not the entire repository.
Example 2: Ask for a provenance-grounded review
Review @discord-bot-architect against metadata.json and ORIGIN.md, then explain which copied upstream files you would load first and why.
Explanation: Use this before review or troubleshooting when you need a precise, auditable explanation of origin and file selection.
Example 3: Narrow the copied support files before execution
Use @discord-bot-architect for <task>. Load only the copied references, examples, or scripts that change the outcome, and name the files explicitly before proceeding.
Explanation: This keeps the skill aligned with progressive disclosure instead of loading the whole copied package by default.
Example 4: Build a reviewer packet
Review @discord-bot-architect using the copied upstream files plus provenance, then summarize any gaps before merge.
Explanation: This is useful when the PR is waiting for human review and you want a repeatable audit packet.
Imported: Production: Deploy global commands during off-peak
// Takes up to 1 hour to propagateawait rest.put(
Routes.applicationCommands(CLIENT_ID),
{ body: commands }
);
Best Practices
Treat the generated public skill as a reviewable packaging layer around the upstream repository. The goal is to keep provenance explicit and load only the copied source material that materially improves execution.
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
Imported Operating Notes
Imported: 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
Troubleshooting
Problem: The operator skipped the imported context and answered too generically
Symptoms: The result ignores the upstream workflow in plugins/antigravity-awesome-skills-claude/skills/discord-bot-architect, fails to mention provenance, or does not use any copied source files at all.
Solution: Re-open metadata.json, ORIGIN.md, and the most relevant copied upstream files. Load only the files that materially change the answer, then restate the provenance before continuing.
Problem: The imported workflow feels incomplete during review
Symptoms: Reviewers can see the generated SKILL.md, but they cannot quickly tell which references, examples, or scripts matter for the current task.
Solution: Point at the exact copied references, examples, scripts, or assets that justify the path you took. If the gap is still real, record it in the PR instead of hiding it.
Problem: The task drifted into a different specialization
Symptoms: The imported skill starts in the right place, but the work turns into debugging, architecture, design, security, or release orchestration that a native skill handles better.
Solution: Use the related skills section to hand off deliberately. Keep the imported provenance visible so the next skill inherits the right context instead of starting blind.
Related Skills
@devops-deploy - Use when the work is better handled by that native specialization after this imported skill establishes context.
@devops-troubleshooter - Use when the work is better handled by that native specialization after this imported skill establishes context.
@differential-review - Use when the work is better handled by that native specialization after this imported skill establishes context.
@discord-automation - Use when the work is better handled by that native specialization after this imported skill establishes context.
Additional Resources
Use this support matrix and the linked files below as the operator packet for this imported skill. They should reflect real copied source material, not generic scaffolding.
Resource family
What it gives the reviewer
Example path
references
copied reference notes, guides, or background material from upstream
references/n/a
examples
worked examples or reusable prompts copied from upstream
examples/n/a
scripts
upstream helper scripts that change execution or validation
scripts/n/a
agents
routing or delegation notes that are genuinely part of the imported package
agents/n/a
assets
supporting assets or schemas copied from the source package
assets/n/a
Imported Reference Notes
Imported: Sharp Edges
Interaction Timeout (3 Second Rule)
Severity: CRITICAL
Situation: Handling slash commands, buttons, select menus, or modals
Symptoms:
User sees "This interaction failed" or "The application did not respond."
Command works locally but fails in production.
Slow operations never complete.
Why this breaks:
Discord requires ALL interactions to be acknowledged within 3 seconds:
Slash commands
Button clicks
Select menu selections
Context menu commands
If you do ANY slow operation (database, API, file I/O) before responding,
you'll miss the window. Discord shows an error even if your bot processes
the request correctly afterward.
After acknowledgment, you have 15 minutes for follow-up responses.
Recommended fix:
Imported: For components (buttons, menus)
// If you're updating the messageawait interaction.deferUpdate();
// If you're sending a new responseawait interaction.deferReply({ ephemeral: true });
Missing Privileged Intent Configuration
Severity: CRITICAL
Situation: Bot needs member data, presences, or message content
Symptoms:
Members intent: member lists empty, on_member_join doesn't fire
Presences intent: statuses always unknown/offline
Message content intent: message.content is empty string
Why this breaks:
Discord has 3 privileged intents that require manual enablement:
GUILD_MEMBERS - Member join/leave, member lists
GUILD_PRESENCES - Online status, activities
MESSAGE_CONTENT - Read message text (deprecated for commands)
At 100+ servers, you need Discord verification to keep using them.
Recommended fix:
Imported: Avoid Message Content Intent if possible
Use slash commands, buttons, and modals instead of message parsing.
These don't require the Message Content intent.
Command Registration Rate Limited
Severity: HIGH
Situation: Registering slash commands
Symptoms:
Commands not appearing. 429 errors when deploying.
"You are being rate limited" messages.
Commands appear for some guilds but not others.
Why this breaks:
Command registration is rate limited:
Global commands: 200 creates/day, updates take up to 1 hour to propagate
Guild commands: 200 creates/day per guild, instant update
Common mistakes:
Registering commands on every bot startup
Registering in every guild separately
Making changes in a loop without delays
Recommended fix:
Imported: Use a separate deploy script (not on startup)
// deploy-commands.js - Run manually, not on bot startconst { REST, Routes } = require('discord.js');
const rest = newREST().setToken(process.env.DISCORD_TOKEN);
asyncfunctiondeploy() {
// For development: Guild commands (instant)if (process.env.GUILD_ID) {
await rest.put(
Routes.applicationGuildCommands(
process.env.CLIENT_ID,
process.env.GUILD_ID
),
{ body: commands }
);
console.log('Guild commands deployed instantly');
}
// For production: Global commands (up to 1 hour)else {
await rest.put(
Routes.applicationCommands(process.env.CLIENT_ID),
{ body: commands }
);
console.log('Global commands deployed (may take up to 1 hour)');
}
}
deploy();
# Pycord - Don't sync on every startup@bot.eventasyncdefon_ready():
# DON'T DO THIS:# await bot.sync_commands()print(f"Ready! Commands should already be registered.")
# Instead, sync manually or use a flagif __name__ == "__main__":
if"--sync"in sys.argv:
# Only sync when explicitly requested
bot.sync_commands_on_start = True
bot.run(token)
Imported: Never hardcode tokens
// BAD - never do thisconst token = 'MTIzNDU2Nzg5MDEyMzQ1Njc4.ABCDEF.xyz...';
// GOOD - environment variablesrequire('dotenv').config();
client.login(process.env.DISCORD_TOKEN);
Imported: Use .gitignore
# .gitignore
.env
.env.local
config.json
Imported: If token is exposed
Go to Developer Portal immediately
Regenerate the token
Update all deployments
Review bot activity for unauthorized actions
Check git history and force push to remove if needed
// Load with dotenvrequire('dotenv').config();
const token = process.env.DISCORD_TOKEN;
Bot Missing applications.commands Scope
Severity: HIGH
Situation: Slash commands not appearing for users
Symptoms:
Bot is in server but slash commands don't show up.
Typing / shows no commands from your bot.
Commands worked in development server but not others.
Why this breaks:
Discord has two important OAuth scopes:
bot - Traditional bot permissions (messages, reactions, etc.)
applications.commands - Slash command permissions
Many bots were invited with only the bot scope before slash commands
existed. They need to be re-invited with both scopes.