You will need:
- A website with an embedded bot
- Familiarity with JavaScript
Update configuration
To update Webchat’s configuration, you can call thewindow.botpress.config
method after Webchat has been initialized:
Switch to dark theme
Here’s an example that updates Webchat’s theme to dark mode as soon as Webchat loads:- Waits until Webchat is initialized
- Gets the current Botpress user using the
getUser
method - Updates the
themeMode
configuration todark
for the current user`
You don’t need to provide the entire configuration object every time—just the values that you want to update.