Last updated
Last updated
The sendMessage
method allows the bot to send a message to a specific IRC channel or user.
target
(string, required) – The channel (e.g., #channelname
) or username to send the message to.
message
(string, required) – The content of the message.
color
(string, optional) – The color of the message, based on the .
Send a message to a channel:
Send a private message to a user:
Messages sent to a channel should begin with #
in the target
parameter.
Colors are optional and must follow the IRC Color Table.
If a color
parameter is provided, it will override the default messageColor
set during connection.
If no color
is specified in sendMessage
, it will use the messageColor
set in connect
.
If neither sendMessage
nor connect
specify a color, the default IRC color will be used.
Ensure the bot has the necessary permissions to send messages in the channel.