Skip to content
A JS IRC library
JavaScript
Branch: master
Clone or download
Latest commit 08ef081 May 16, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore Updates Aug 14, 2017
LICENSE Initial commit Aug 12, 2017
README.md Change readme May 16, 2018
jsdoc.json
package.json Change readme May 16, 2018

README.md

Carp

A JS IRC library

Install using npm install carpjs

More documentation is available as a JSDoc here

Example usage:

To connect to a server, create a client using the Carp.Client interface;

const client = new Carp.Client({
	username: "MyBot"
})

Then, connect to a server;

client.connect("irc.freenode.net", 6667)

When the client has logged in, join a channel;

client.on("ready", () => {
	client.join("#mychannel")
})

When the client joins the channel, you can get the channel and respond to messages;

client.on("join", data => {
	const channel = data.channel

	channel.on('message', (from, message) => {
		channel.sendMessage(`${from.info.nick} said ${message.join(" ")}`)
	})
})
You can’t perform that action at this time.