CommunityCodierung & Entwicklunggithub.com

sickn33/discord-bot-architect

Spezialisiertes Skill zur Entwicklung produktionsreifer Discord-Bots. Behandelt Discord.js (JavaScript) und Pycord (Python), Gateway Intents, Slash-Commands, interaktive Komponenten, Ratenbegrenzung und Sharding.

Was ist discord-bot-architect?

Dieses Skill bietet eine umfassende Anleitung und Best Practices für die Entwicklung von Discord-Bots, die für den Produktionseinsatz bereit sind. Es unterstützt zwei Hauptframeworks: Discord.js (für JavaScript/Node.js) und Pycord (für Python). Das Skill behandelt kritische Aspekte wie Gateway Intents, die steuern, welche Ereignisse der Bot empfängt, sowie die Implementierung moderner Slash-Commands und interaktiver Komponenten wie Buttons und Menüs. Darüber hinaus werden fortgeschrittene Themen wie Ratenbegrenzung (Rate Limiting) zur Vermeidung von API-Sperren und Sharding zur Skalierung auf mehrere Prozesse oder Server detailliert erklärt. Entwickler erhalten klare Codebeispiele, Konfigurationshinweise und Architekturmuster, um stabile, skalierbare und effiziente Discord-Bots zu erstellen.

Funktioniert mit~Claude Code~Codex CLI~Cursor
Part ofReact
npx skills add https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/discord-bot-architect

Installed? Explore more Codierung & Entwicklung skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

In Ihrer bevorzugten KI fragen

Öffnet einen neuen Chat, in dem dieser Agent-Skill bereits geladen ist.

Dokumentation

Was macht discord-bot-architect?

Spezialisiertes Skill zur Entwicklung produktionsreifer Discord-Bots. Behandelt Discord.js (JavaScript) und Pycord (Python), Gateway Intents, Slash-Commands, interaktive Komponenten, Ratenbegrenzung und Sharding.

Überblick

Dieses Skill richtet sich an Entwickler, die Discord-Bots mit hohen Qualitätsstandards erstellen möchten. Es bietet eine strukturierte Anleitung zur Auswahl und Verwendung der Frameworks Discord.js für JavaScript und Pycord für Python. Der Fokus liegt auf den neuesten Discord-Funktionen (Slash-Commands, interaktive Komponenten) sowie auf Themen, die für die Produktion entscheidend sind: zuverlässige Ereignisverarbeitung durch Gateway Intents, Schutz vor API-Ratenbegrenzung und horizontale Skalierung mittels Sharding.

Inhalt

Gateway Intents

  • Erläuterung: Discord verwendet Gateway Intents, um zu definieren, welche Ereignisse (z.B. Nachrichten, Mitglieder, Reaktionen) ein Bot empfängt. Eine korrekte Konfiguration reduziert die Systemlast und verbessert die Leistung.
  • Umsetzung:
    • In Discord.js: GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, etc. werden im Client-Konstruktor als Array übergeben.
    • In Pycord: Intents werden als Parameter beim Erstellen des Bot-Objekts gesetzt, z.B. intents = discord.Intents.default(); bot = commands.Bot(command_prefix='!', intents=intents).
  • Best Practices: Verwende nur die benötigten Intents, um Speicher und Netzwerkbandbreite zu sparen.

Slash-Commands

  • Definition: Slash-Commands sind die moderne Methode, um Befehle in Discord zu registrieren. Sie werden automatisch in der Benutzeroberfläche angezeigt und validiert.
  • Beispiel (Discord.js):
    const { SlashCommandBuilder } = require('@discordjs/builders');
    const command = new SlashCommandBuilder()
        .setName('ping')
        .setDescription('Antwortet mit Pong!');
    
  • Beispiel (Pycord):
    @bot.slash_command(name="ping", description="Antwortet mit Pong!")
    async def ping(ctx):
        await ctx.respond("Pong!")
    

Interaktive Komponenten

  • Übersicht: Discord unterstützt Buttons, Select-Menüs und Modals. Diese Komponenten erhöhen die Nutzerinteraktivität.
  • Implementierung:
    • Buttons: Erstelle Button oder ButtonStyle Objekte und sende sie als Teil einer Nachricht (components).
    • Event-Handling: Nutze interactionCreate (Discord.js) oder on_interaction (Pycord), um auf Komponenteninteraktionen zu reagieren.
  • Hinweis: Achte auf Timeout-Mechanismen, um Ressourcen bei inaktiven Komponenten freizugeben.

Ratenbegrenzung (Rate Limiting)

  • Problem: Discord API hat Limits (z.B. 50 Requests pro Sekunde pro Route). Überschreitungen führen zu 429 Too Many Requests.
  • Lösungen:
    • Implementiere Wartezeiten mit Exponential Backoff.
    • Verwende Bibliotheken wie discord.js oder pycord, die bereits Rate-Limiting-Handling integriert haben.
  • Konfiguration: Passe retryAfter-Header an und nutze Bucket-Strategien.

Sharding

  • Zweck: Sharding teilt einen Bot in mehrere Prozesse auf, um Discord API-Limits zu umgehen und die Leistung zu steigern.
  • Umsetzung:
    • Discord.js: Verwende ShardingManager, um Shards zu erstellen.
    • Pycord: Nutze AutoShardedClient für automatisches Sharding.
  • Best Practices: Wähle eine Shard-Anzahl basierend auf der Gildenanzahl (Discord empfiehlt ~1000 Gilden pro Shard).

Unterstützte Plattformen

  • Discord.js (Node.js)
  • Pycord (Python)

Nützliche Links

Lizenz

Dieses Skill unterliegt der MIT License.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

sickn33/3d-web-experience

Expert in building 3D experiences for the web - Three.js, React Three Fiber, Spline, WebGL, and interactive 3D scenes. Covers product configurators, 3D portfolios, immersive websites, and bringing depth to web experiences.

sickn33/agent-memory-mcp

A hybrid memory system that provides persistent, searchable knowledge management for AI agents (Architecture, Patterns, Decisions).

sickn33/agent-memory-systems

Memory is the cornerstone of intelligent agents. Without it, every interaction starts from zero. This skill covers the architecture of agent memory: short-term (context window), long-term (vector stores), and the cognitive architectures that organize them.

sickn33/ai-agents-architect

Expert in designing and building autonomous AI agents. Masters tool use, memory systems, planning strategies, and multi-agent orchestration.

sickn33/api-documentation-generator

Generate comprehensive, developer-friendly API documentation from code, including endpoints, parameters, examples, and best practices

sickn33/api-patterns

API design principles and decision-making. REST vs GraphQL vs tRPC selection, response formats, versioning, pagination.

sickn33/api-security-best-practices

Implement secure API design patterns including authentication, authorization, input validation, rate limiting, and protection against common API vulnerabilities

sickn33/app-store-optimization

Complete App Store Optimization (ASO) toolkit for researching, optimizing, and tracking mobile app performance on Apple App Store and Google Play Store

sickn33/architecture

Architectural decision-making framework. Requirements analysis, trade-off evaluation, ADR documentation. Use when making architecture decisions or analyzing system design.

sickn33/audio-transcriber

Transform audio recordings into professional Markdown documentation with intelligent summaries using LLM integration

sickn33/aws-serverless

Specialized skill for building production-ready serverless applications on AWS. Covers Lambda functions, API Gateway, DynamoDB, SQS/SNS event-driven patterns, SAM/CDK deployment, and cold start optimization.

sickn33/backend-architect

Expert backend architect specializing in scalable API design, microservices architecture, and distributed systems.

sickn33/backend-dev-guidelines

You are a senior backend engineer operating production-grade services under strict architectural and reliability constraints. Use when routes, controllers, services, repositories, express middleware, or prisma database access.

sickn33/bash-linux

Bash/Linux terminal patterns. Critical commands, piping, error handling, scripting. Use when working on macOS or Linux systems.

sickn33/bash-scripting

Bash scripting workflow for creating production-ready shell scripts with defensive patterns, error handling, and testing.

sickn33/brainstorming

Use before creative or constructive work (features, architecture, behavior). Transforms vague ideas into validated designs through disciplined reasoning and collaboration.

sickn33/browser-automation

Browser automation powers web testing, scraping, and AI agent interactions. The difference between a flaky script and a reliable system comes down to understanding selectors, waiting strategies, and anti-detection patterns.

sickn33/browser-extension-builder

Expert in building browser extensions that solve real problems - Chrome, Firefox, and cross-browser extensions. Covers extension architecture, manifest v3, content scripts, popup UIs, monetization strategies, and Chrome Web Store publishing.

sickn33/bullmq-specialist

BullMQ expert for Redis-backed job queues, background processing, and reliable async execution in Node.js/TypeScript applications.

sickn33/bun-development

Fast, modern JavaScript/TypeScript development with the Bun runtime, inspired by [oven-sh/bun](https://github.com/oven-sh/bun).

Verwandte Skills