timing_middleware
Function
Reports commands slower than a threshold.
from discord_interactions.slash import timing_middlewareSignature
def timing_middleware( *, slow_threshold_ms: float = 3000, on_slow: Callable[[SlashContext, float], Awaitable[None]] | None = None,) -> MiddlewareParameters
| Name | Type | Default | Description |
|---|---|---|---|
slow_threshold_ms | float | 3000 | |
on_slow | Callable[[SlashContext, float], Awaitable[None]] | None | None |
Returns
Middleware