disagreement/docs/hybrid_context.md
Slipstream a13cf1e4f8
Some checks failed
Deploy MkDocs / deploy (push) Has been cancelled
docs: sync with codebase (#65)
2025-06-11 17:09:23 -06:00

15 lines
507 B
Markdown

# HybridContext
`HybridContext` wraps either a prefix `CommandContext` or a slash `AppCommandContext`. It exposes a single `send` method that proxies to the appropriate reply method for the underlying context.
```python
from disagreement import HybridContext
@commands.command()
async def ping(ctx: commands.CommandContext) -> None:
hybrid = HybridContext(ctx)
await hybrid.send("Pong!")
```
It also forwards attribute access to the wrapped context and provides an `edit` helper when supported.