← Dokumentation  /  Entwicklerhandbuch

Erstelle ein Plugin

Die vollständige SDK-Referenz für Plugin-Entwickler — Sandboxed Python, als ZIP-Datei versendet, über den Marketplace verteilt.

These docs are publicly viewable. To publish a plugin you'll need a free YourBot account: sign in to access the Dev Portal.
SDK v0.8.4

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 /leaderboard ein → 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 with ctx.ws and 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

BereichPlugin (diese Plattform)Selbst gehosteter Bot (discord.py usw.)
Mit Discord verbindenPlattform übernimmt esDu übernimmst es
Server zum Hosten des CodesPlattform stellt bereitDu mietest / verwaltest
Zahlungen / StripePlattform verwaltetDu baust es selbst
Pro Kunde InstallationEin Klick für KundenDu führst jeden Kunden durch OAuth
Skalierung / Kontingente / WiederholungenPlattform verwaltetDu verwaltest es
Bewertungen / ErkennbarkeitIntegrierter MarktplatzDu vermarktest deinen Bot selbst
Discord API-OberflächeFähigkeitsbegrenzt (deklariere, was du brauchst)Vollzugriff (deine Verantwortung)

Wo du deine Zeit verbringst

  1. Ereignisse mit Handlern verbinden. Dekoratoren wie @plugin.on_event("message_create") oder @plugin.on_slash_command("hello").
  2. Status speichern. Per-server settings, counters and leaderboards live in ctx.kv (key-value, every plugin has it) or ctx.sql (full SQL, a capability you request that is granted after staff review). Either way there is no database to manage.
  3. (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.http to domains you declare; live connections go through ctx.ws.
  • Nothing persists on disk. Containers are wiped between restarts. Durable state belongs in ctx.kv or ctx.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_content and 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 clicksAlle Ereignisse
Slash-BefehlSlash-Befehle
Neue Nachrichtenevents:message_content
Store per-server settings or countersSchlüssel-Wert-Speicher
Keep an API key without hardcoding itBerechtigte Benutzer
Run real SQL queriesStorage & I/O: Sandboxed SQL
Call an external APIAusgehende HTTP-Anfragen mocken
Hold a live connection to a game serverStorage & I/O: WebSockets
Do something on a scheduleCron-Zeitpläne
Einstellungen anzeigenDashboard-Manifest (JSON)
Test my plugin before uploadingErste Schritte
See what my plugin is allowed to touchReference: Capability catalog
Check every size and rate limitReference: Limits and quotas
Plugin löschenBenenne dein Plugin
Veröffentlichen & prüfenVeröffentlichen & prüfen

SDK v0.8.4 · Zuletzt aktualisiert Juli 2026 · Zurück zum Entwicklerportal