Skip to main content
To connect a Discord bot runtime to Lautch, create a LautchClient with a connection token and the gateway URL, then connect it and synchronize the runtime state.

Create the client

The SDK accepts the connection token issued by Lautch and the WebSocket URL of the API.
Keep the connection token in the runtime environment. Do not expose it to browser code or commit it to the repository.

Register modules

After the connection is established, register the modules the bot wants to expose and synchronize their manifest.

What happens next

Lautch validates the manifest, stores the module definition for the bot, and makes the module available in that bot’s dashboard. Authorization is checked independently from whether a module is visible.