SDK for building plugins for the YourBot Discord bot platform.
YourBot runs marketplace plugins in sandboxed Docker containers. This SDK is the official Python interface plugins use to receive Discord events, call the Discord API, store data, render dashboards, and emit metrics — all routed through the platform so plugins never need direct network access or credentials.
pip install yourbot-sdkPython 3.10 or newer.
from yourbot_sdk import Plugin, Context
plugin = Plugin()
@plugin.on_event("message_create")
def on_message(ctx: Context, event: dict):
if "!ping" in event.get("content", ""):
ctx.discord.send_message(
channel_id=event["channel_id"],
content="Pong!",
)
plugin.run() # must be the last lineDrop this in a folder named my_plugin/ as __main__.py, zip it, and upload it
via the Developer Portal.
The package installs a yourbot command for scaffolding and a local dev loop:
yourbot new my_plugin # scaffold a new plugin from the template
yourbot dev # run your plugin locally against a mock hostFull plugin contract, capability reference, and publishing guide:
- Docs: https://yourbot.gg/dev/docs
- Developer Portal: https://yourbot.gg/dev
MIT — see LICENSE.