Skip to main content

sendMessage

codebolt.chat.sendMessage(message: string): void
Sends a message through the WebSocket connection.

Parameters

NameTypeDescription
messagestringThe message to be sent.

Example

// Send a message through the WebSocket connection
const message = await codebolt.chat.sendMessage("Hello, everyone!");

sendMessage

Explanation

The codebolt.chat.sendMessage(message: string) function is used to send a message on the codebolt chat . This function enables real-time communication by allowing the script to send text messages on the codebolt chat.