@jprochazk/twitch_irc
Advanced tools
Comparing version 0.11.0 to 0.11.1
@@ -6,3 +6,3 @@ { | ||
"name": "@jprochazk/twitch_irc", | ||
"version": "0.11.0", | ||
"version": "0.11.1", | ||
"description": "Twitch chat client", | ||
@@ -9,0 +9,0 @@ "license": "MIT", |
@@ -28,9 +28,46 @@ # twitch_irc | ||
``` | ||
$ npm i twitch_irc | ||
$ npm install twitch_irc@npm:jprochazk/twitch_irc | ||
``` | ||
ESM: | ||
```ts | ||
import * as TwitchIrc from "https://deno.land/x/twitch_irc/mod.ts"; | ||
// index.mjs | ||
// or index.js, but with "type":"module" in package.json | ||
import * as TwitchIrc from "twitch_irc"; | ||
const channel = /*...*/; | ||
const nick = /*...*/; | ||
const pass = /*...*/; | ||
const client = new TwitchIrc.Client({ | ||
credentials: { nick, pass } | ||
}); | ||
client.on("privmsg", ({ user, message }) => { | ||
console.log(`${user.login}: ${message}`); | ||
}); | ||
client.on("open", () => { | ||
client.join(channel); | ||
}); | ||
``` | ||
CommonJS: | ||
```ts | ||
// index.js | ||
const TwitchIrc = require("twitch_irc"); | ||
const channel = /*...*/; | ||
const nick = /*...*/; | ||
const pass = /*...*/; | ||
const client = new TwitchIrc.Client({ | ||
credentials: { nick, pass } | ||
}); | ||
client.on("privmsg", ({ user, message }) => { | ||
console.log(`${user.login}: ${message}`); | ||
}); | ||
client.on("open", () => { | ||
client.join(channel); | ||
}); | ||
``` | ||
### Features | ||
@@ -37,0 +74,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
175021
137