Skip to content
HTTP & JSON Premium wsClose

$wsClose[]

$wsClose closes the connection of a WebSocket source cleanly (code 1000). It does nothing if the source is already closed. It returns nothing.

Premium Reserved for Premium accounts. See plans

Syntax

bdfd
$wsClose[source]

Parameters

Parameter Description
source Required. The name of a source declared on the bot’s WebSocket page.

Behavior

  • A permanent source closed this way stays closed until the bot restarts, or until $wsJoin opens it again.
  • The workflow of the source receives a close event (((ws.event))).
  • Errors: ws_unknown_source, ws_unavailable.

Examples

$wsClose[partie]

Try it

Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.