Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 

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(" ")}`)
	})
})

About

A JS IRC library

Resources

License

Releases

No releases published

Packages

No packages published