IRC bot is a program that connects to IRC as one of the clients and appears as one of the users in the IRC channels. These IRC bots are used to provide IRC services or to host chat-based custom implementations that will help teams to efficiently collaborate.
Let's start by creating a folder on our local drive, in order to store our bot program, from the Command Prompt:
mkdir ircbot cd ircbot
Assuming we have Node.js and npm installed, let's create and initialize our package.json
, which will store our bot's dependencies and definitions:
npm init
Once you have gone through the npm init
options (which are very easy to follow), you'll see something similar to this:
In your project folder, you'll see the result, which is your package.json
file:
Let's install the irc
package from npm. This can be located at
https://www.npmjs.com/package/irc
.
In order to install it, run this npm command.
npm install --save irc
You should then see something...