npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

twitch-chat-bot

v0.4.1

Published

an attempt to provide a generic, but highly-configurable platform for developers intending to create Twitch chat bots in Node.js

Downloads

5

Readme

twitch-chat-bot 0.4.1

a highly customizable base Twitch chat bot to build on

npm install twitch-chat-bot

const {
	TwitchChatBot,
} = require("twitch-chat-bot");

function main()
{
	let myBot = new TwitchChatBot({
		credentials: {
			username: "bot_username",
			oauth: "oauth_string",
			channel: "twitch_channel",
		},
	});

	myBot.on("ready", ready);
}

function ready()
{
	this.sendMessage("is online", { action: true });
}

main();

See: Getting Started

Features:

  • Easy to get started.
  • Many, many aspects of bot operation can be controlled at a very low level
  • Event-driven operation allows a high level of customization
  • i18n compliant (English & German translations available)

Command Center

  • Add new chat commands by passing parameters
  • Built-in, customizable chat cooldown with global and individual settings
  • Commands are versatile and support aliases, shortcuts, plain text commands, and complex function-driven commands
  • Commands can be added directly inside modules
  • Built-in safe moderation helper
  • Moderation helper can be customized to notify moderators of abuse (eg. spamming commands) or instructed to perform timeouts/bans without human approval
  • Several commands built in to internal modules, pre-loaded
  • Abilty to enable and disable any command programmatically, through chat commands, and manually, through the options object
  • Override permissions for internal "default" commands

Self-Documenting

  • Built-in !helpfile command that documents all commands, both internal and custom and produces documents for every permission level. Documents formatted for Discord Markdown.

Block List

  • prevent users from accessing commands permanently
  • prevent bots from cross-talking and/or participating in chat games

Message Queue

  • Uses configurable limits for how quickly the bot can message chat.
  • Manual override built-in to messaging system to allow exceptions.
  • Messaging includes many configurable options include action messages, announcements, callbacks for after the message has beent sent, and skipping the message queue, entirely.

Timer

  • Tracks live status of your stream, according to settings and/or chat commands.
  • Fires an event that modules and direct code can monitor and react to.
  • Supports custom events that are fired by the implementation, programmatically

User Tracker

  • Tracks how often users send chat messages
  • Tracks active/inactive users based on customizable cooldowns (last typed in chat)
  • Provides a service to pick random users from either the active pool or all users that have participated in chat

Loyalty Points/Chat Currency

  • Currently support StreamElements, to allow custom games to award loyalty points for chat activities, games, etc.
  • Looking to add support for both StreamLabs and custom, internal currency systems

Database

  • Built-in support for both MySQL and JSON file-based databases
  • Tracks streams live status, detects and reacts to crashes and prevents the bot from "starting over" if timers are in use