v0.2.0 — Now on PyPI ≈ 90% discord.py compat

Drop in.
Scale up.

A Discord framework that upgrades your bot without rewriting it. Change one import line, get production-ready features instantly. Run anywhere — gateway or serverless.

before — discord.py
import discord

bot = discord.Client(
    intents=discord.Intents.default()
)

@bot.command()
async def ping(ctx):
    await ctx.send("Pong!")

bot.run("TOKEN")
after — SoSad
import sosad.compat as discord

bot = discord.Bot(
    intents=discord.Intents.default()
)

@bot.command(name="ping")
async def ping(ctx):
    await ctx.send("Pong!")

bot.run("TOKEN")

What you get for free

Just change the import. Everything else is automatic.

Auto Rate Limiting

Per-route bucket tracking. Never see HTTP 429 again.

🛡️

Error Pipeline

Typed exceptions, catch handlers, graceful recovery.

🔧

FastAPI-style DI

Auto-resolve from type annotations. No inject() needed.

🔗

ASGI Middleware

Pipeline middleware, not before/after events.

🧩

Auto Plugin Discovery

Drop files in plugins/. Done.

Background Tasks

@sosad.task(interval=300) — cron without the pain.

🎨

View / Modal Builders

Build components dynamically, not with decorators.

📄

Persistent Views + Paginator

Stateful views with timeout + built-in page navigation.

☁️

REST Bot (Serverless)

No WebSocket. Deploy to Workers, Fly.io, or Railway.

🎛️

CLI Scaffold

sosad init mybot — Gateway, REST, or Components template.

📊

Structured Logging

Every request logged with timing and context.

⚙️

Settings

class Config(sosad.Settings) + auto .env loading.

discord.py vs SoSad

Same code. Better backend.

Feature discord.py SoSad
Rate Limiting Manual ✓ Auto
Error Handling try/except ✓ Pipeline
Dependency Injection None ✓ FastAPI-style
Middleware Before/After ✓ ASGI Pipeline
Plugins Manual load ✓ Auto-discover
Background Tasks Manual asyncio @task()
Persistent Views Built-in PersistentView
Paginator 3rd party ✓ Built-in
REST / Serverless No RestBot
CLI Scaffold sosad init
Type Safety Partial ✓ Full strict
Config Manual .env ✓ Settings class

Get started in 30 seconds

$ pip install sosad

Read the Quick Start →