Snaps and tasks
Snaps are named button, select, and modal handlers. Signed custom IDs can carry a versioned route and expiry without trusting browser or Discord-supplied state.
Tasks are created with task(). Add payloadSchema to validate manually scheduled and delayed payloads before execution. Retry, timeout, overlap, idempotency, cancellation, and shutdown draining are handled by the shared task runner. In-process cron expressions run in UTC; a non-UTC timezone is rejected because Bun does not implement it for this scheduler.
Delayed storage jobs are claimed atomically. Custom storage adapters used for delayed work must implement atomic zrem; Redis uses a Lua claim operation.