Last updated
Last updated
Since you already defined your credentials with method, is now time to establish a connection to an IRC server with the specified settings.
server
(string, required) – The IRC server address to connect to.
port
(number, required) – The port number to use for the connection.
ssl
(boolean, required) – Determines whether to use SSL encryption.
messageColor
(string, optional) – Sets the color for messages, based on the .
removeColors
(boolean, optional, default: true
) – Removes IRC color codes from messages.
rejectUnauthorized
(boolean, optional, default: false
) – Whether to reject unauthorized SSL certificates.
rejoinLimit
(number, optional) – Number of times it will try to rejoin a certain channel.
rejoinDelay
(number, optional) – Delay (in ms) of wich it will try to rejoin a certain channel.
maxLineLength
(number, optional) – Max. characters that is allowed per message, after that it will be splitted into the next message.
Ensure the server and port values match the intended IRC network.
If using SSL, make sure the server supports secure connections.
messageColor
should correspond to a valid IRC color code.
Set rejectUnauthorized
to true
only if strict SSL verification is needed.
Once the connection is successfully established, the bot will emit a connected
event.