Skip to main content

SDK for building YourBot Marketplace plugins

Project description

YourBot SDK

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.

Install

pip install yourbot-sdk

Python 3.10 or newer.

Hello, plugin

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 line

Drop this in a folder named my_plugin/ as __main__.py, zip it, and upload it via the Developer Portal.

CLI

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 host

Documentation

Full plugin contract, capability reference, and publishing guide:

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yourbot_sdk-0.8.4.tar.gz (82.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yourbot_sdk-0.8.4-py3-none-any.whl (87.2 kB view details)

Uploaded Python 3

File details

Details for the file yourbot_sdk-0.8.4.tar.gz.

File metadata

  • Download URL: yourbot_sdk-0.8.4.tar.gz
  • Upload date:
  • Size: 82.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for yourbot_sdk-0.8.4.tar.gz
Algorithm Hash digest
SHA256 2a9f858a0e92e0e26c031641d0288d306009395784dc84b97e4236efb6b88f21
MD5 dad5a6c679ae9a14822dd369a83bcfdb
BLAKE2b-256 a49a4b70100a318e3c6f8f41f755ee1172696fe3296971a654635c543755530b

See more details on using hashes here.

File details

Details for the file yourbot_sdk-0.8.4-py3-none-any.whl.

File metadata

  • Download URL: yourbot_sdk-0.8.4-py3-none-any.whl
  • Upload date:
  • Size: 87.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for yourbot_sdk-0.8.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1d57b8a43e7865101fbea48b57cb02ef8b29ad0d0cdd76bfeaaec675c16e3151
MD5 ec5461d538f0559880adda9463400fe0
BLAKE2b-256 3423f4e84253248115d50b80ecd1964a6552d079382051a5dd84b2d9108e0123

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page