Erstelle ein Plugin
Die vollständige SDK-Referenz für Plugin-Entwickler — Sandboxed Python, als ZIP-Datei versendet, über den Marketplace verteilt.
Plugins sind isolierte Python-Prozesse. Schreibe einen Handler, deklariere deine Fähigkeiten, lade ein Zip hoch — wir führen es in einem abgesicherten Docker-Container aus und übertragen Discord-Events per JSON-RPC.
Was ist ein Plugin?
Ein Plugin ist ein kleines Programm, das auf Ereignisse in einem Discord-Server lauscht und darauf reagiert.
- Jemand betritt deinen Server → dein Plugin sendet eine Willkommensnachricht.
- Jemand gibt
/leaderboardein → dein Plugin antwortet mit den Top 10 Nutzern. - Someone reacts to a message → your plugin counts the vote and updates the tally.
Du schreibst Python. Du importierst das SDK. Du dekorierst eine Funktion mit @plugin.on_event("member_join") und schreibst, was passieren soll. Die Plattform erledigt den Rest.
Was die Plattform für dich erledigt
- Verbindet sich mit Discord. Du musst dich nie mit WebSocket-Gateways, Sharding, Intents oder Rate-Limits befassen. Die Plattform liefert Ereignisse an deine Handler und wandelt deine Rückgabewerte in Discord-API-Aufrufe um.
- Hostet deinen Code. Keine Server zu mieten, kein Docker zu verwalten, keine Deployments um 2 Uhr nachts. Pushe deinen Code — die Plattform führt ihn in einer isolierten Sandbox aus.
- Talks to the outside world. Call external APIs with
ctx.http, hold live connections open withctx.wsand let the platform inject API keys from encrypted secrets so your code never touches them. See Outbound HTTP. - Übernimmt Zahlungen. Set a price or ship it free. Customers pay through Stripe and you keep 70–85% of revenue (tier depends on your last 30 days of volume), paid out to your bank automatically after a hold period. See Selling your plugin.
- Skaliert für dich. Eine Installation oder eine Million — die Plattform übernimmt Parallelität, Wiederholungsversuche und Kontingente.
Was du tust
Schreibe die Logik, die Discord-Ereignisse in Aktionen umwandelt. Das ist alles. Der Ablauf sieht so aus:
┌─────────────────┐ ┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ Discord event │────▶│ YourBot │────▶│ Your plugin's │────▶│ YourBot │
│ (msg, /cmd…) │ │ gateway │ │ handler │ │ sends to │
│ │ │ │ │ │ │ Discord │
└─────────────────┘ └──────────────────┘ └──────────────────┘ └──────────────────┘
▲
│
you write this part
Wie sich ein Plugin von einem "Discord-Bot-Framework" unterscheidet
| Bereich | Plugin (diese Plattform) | Selbst gehosteter Bot (discord.py usw.) |
|---|---|---|
| Mit Discord verbinden | Plattform übernimmt es | Du übernimmst es |
| Server zum Hosten des Codes | Plattform stellt bereit | Du mietest / verwaltest |
| Zahlungen / Stripe | Plattform verwaltet | Du baust es selbst |
| Pro Kunde Installation | Ein Klick für Kunden | Du führst jeden Kunden durch OAuth |
| Skalierung / Kontingente / Wiederholungen | Plattform verwaltet | Du verwaltest es |
| Bewertungen / Erkennbarkeit | Integrierter Marktplatz | Du vermarktest deinen Bot selbst |
| Discord API-Oberfläche | Fähigkeitsbegrenzt (deklariere, was du brauchst) | Vollzugriff (deine Verantwortung) |
Wo du deine Zeit verbringst
- Ereignisse mit Handlern verbinden. Dekoratoren wie
@plugin.on_event("message_create")oder@plugin.on_slash_command("hello"). - Status speichern. Per-server settings, counters and leaderboards live in
ctx.kv(key-value, every plugin has it) orctx.sql(full SQL, a capability you request that is granted after staff review). Either way there is no database to manage. - (Optional) Eine Einstellungsseite. Lasse ein JSON-Manifest fallen und Kunden erhalten eine Dashboard-Seite, von der aus sie dein Plugin konfigurieren können. Kein Frontend-Code erforderlich.
You can build and submit your first plugin in an afternoon. New developers' first versions go through a short staff review before they appear in the marketplace; established developers publish instantly. Click "Getting started" above when you're ready to write code. Prefer not to start from a blank file? The Plugin Builder writes a working first draft from a description, and the yourbot CLI runs it locally before you upload anything.
Good to know before you build
- Your code has no direct network access. All HTTP goes through
ctx.httpto domains you declare; live connections go throughctx.ws. - Nothing persists on disk. Containers are wiped between restarts. Durable state belongs in
ctx.kvorctx.sql. - Resources are capped. 64 MB memory and a fraction of a vCPU per worker. The full numbers live in Limits and quotas.
- Timers do not run on their own. Marketplace plugins are event-driven: periodic work rides on event traffic with a cooldown. See Pool mode.
- Reading what people type is a privacy capability. Message text arrives empty unless you request
events:message_contentand the server approves it. See the capability catalog. - Your first version is reviewed by a human. Plan for a short wait before it goes live. See Publish & review.
Vorhandene FAQ
Jump straight to the section that answers your question. The filter box above only searches the tab you are on.
| I want to… | Gehe zum |
|---|---|
| React when someone joins, posts or clicks | Alle Ereignisse |
| Slash-Befehl | Slash-Befehle |
| Neue Nachrichten | events:message_content |
| Store per-server settings or counters | Schlüssel-Wert-Speicher |
| Keep an API key without hardcoding it | Berechtigte Benutzer |
| Run real SQL queries | Storage & I/O: Sandboxed SQL |
| Call an external API | Ausgehende HTTP-Anfragen mocken |
| Hold a live connection to a game server | Storage & I/O: WebSockets |
| Do something on a schedule | Cron-Zeitpläne |
| Einstellungen anzeigen | Dashboard-Manifest (JSON) |
| Test my plugin before uploading | Erste Schritte |
| See what my plugin is allowed to touch | Reference: Capability catalog |
| Check every size and rate limit | Reference: Limits and quotas |
| Plugin löschen | Benenne dein Plugin |
| Veröffentlichen & prüfen | Veröffentlichen & prüfen |
SDK v0.8.4 · Zuletzt aktualisiert Juli 2026 · Zurück zum Entwicklerportal