Skip to content

SoSad

Drop in. Scale up.

A modern, modular, type-safe Discord framework built on Hikari.

Change one line. Get production-ready features instantly.

import sosad.compat as discord  # ← that's it

bot = discord.Bot(intents=hikari.Intents.ALL_UNPRIVILEGED)

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

bot.run("TOKEN")

Get Started View on GitHub


Why SoSad?

For discord.py refugees

Feature discord.py SoSad
Rate limiting Manual retry Automatic per-route
Error handling try/except Error pipeline
Dependency Injection None FastAPI-style container
Middleware Before/After hooks ASGI-style pipeline
Plugins Manual load_extension Auto-discover
Config os.getenv pydantic-style Settings
Type safety Partial Pyright strict
REST mode ✅ (no gateway needed)
Persistent Components ✅ (survive restarts)
Task scheduler ✅ (cron-like)
CLI scaffold ✅ (sosad new)

For new projects

import hikari
import sosad

class Config(sosad.Settings):
    token: str

bot = sosad.Client(token=Config().token, intents=hikari.Intents.ALL_UNPRIVILEGED)

@sosad.slash_command("ping", "Pong!")
async def ping(ctx: sosad.InteractionContext):
    await ctx.respond("Pong!")

bot.run()

Quick install

pip install sosad
# or
uv add sosad

Architecture

┌──────────────────────────────────────────────────┐
│                    Your Code                      │
│  ┌──────────┐  ┌──────────┐  ┌────────────────┐  │
│  │ Commands  │  │ Plugins   │  │  Components     │  │
│  └────┬─────┘  └────┬─────┘  └───────┬────────┘  │
├───────┴─────────────┴─────────────────┴──────────┤
│                    SoSad Core                      │
│  ┌──────────┐  ┌──────────┐  ┌────────────────┐  │
│  │  Router   │  │Middleware│  │  DI Container   │  │
│  └────┬─────┘  └────┬─────┘  └───────┬────────┘  │
│       └─────────────┴─────────────────┘           │
│  ┌──────────────────────────────────────────────┐  │
│  │              Hikari (transport)               │  │
│  └──────────────────────────────────────────────┘  │
└──────────────────────────────────────────────────┘

Features