setCredentials
The setCredentials
method sets the bot's nickname, real name, and optional password for connecting to an IRC server.
Syntax
Parameters
nickname
(string, required) – The nickname your bot will use on the IRC network.realname
(string, required) – The real name or description of the bot.password
(string, optional, default:null
) – The optional password for authentication, if required by the server.
Example Usage
This sets the bot's nickname to YOUR-NICKNAME
and the real name to BOT-DESCRIPTION
, without a password.
If authentication is required (your account is registered):
Notes
The nickname should be unique on the IRC server.
If a password is required, ensure it is stored securely.
Calling
setCredentials
before connecting ensures the correct identity is used.
Last updated