HandlerContext
The second argument of a server.on handler, and the third of a command or chat handler. Its signal aborts when the work should stop: the player whose event or command it is left, the decision’s deadline passed, or your gamemode is stopping.
Definition
Section titled “Definition”type HandlerContext = { readonly signal: AbortSignal };Fields
Section titled “Fields”| Field | Type | Description |
|---|---|---|
signal |
AbortSignal |
Aborts when the work should stop. Check it after an await, or pass it to fetch. |
Related
Section titled “Related”- Async handlers: when work stops
server.detached: work that should not stop