Skip to content

cshaa/irc.ts

Repository files navigation

@csha/irc

A modernized fork of npm:irc.

import { Client } from "@csha/irc";

const client = new Client("irc.libera.chat", "my-irc-bot", {
  channels: ["#my-irc-bot-test"],
});

client.addListener("message", (from: string, to: string, message: string) => {
  console.log(from + " => " + to + ": " + message);
  client.say(to, "I'm a bot!");
});

client.addListener("pm", (from: string, message: string) => {
  console.log(from + " => ME: " + message);
  client.say("csha", "I'm a bot!");
});

About

a TypeScript IRC client for modern JS runtimes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published