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

crispybot

v4.0.3

Published

An annoying bot.

Downloads

45

Readme

Crispy

An annoying bot.

This bot is being developed for personal use in my community's chatroom on https://jumpin.chat.

Inspiration

I have this friend called Crispy and he talks a lot on chat, much faster than any of us can answer, he didn't seen to care when we stopped trying to answer him too... he would just keep talking to himself... so I decided to make a bot to keep up with him.

History

  • Initial version: The bot would send messages from Ipsum Lorem every time the real Crispy talked.
  • English version: A friend asked me to make it talk english, so I did with markovian chains.
  • Nov 18, 2018 - First commit: After implementing some sort of machine learning I decided it should be on GitHub.
  • Nov 19 ~ Dec 5, 2018: Lots of improvements to code, speech, detection of messages, plus fixes and new commands.
  • Dec 6 ~ 12, 2018: Added bot account that can be modded and profile validation for admin commands.
  • Dec 13 ~ 16, 2018: Fixed login issues and other errors and improves ban function.
  • Dec 21 ~ 22, 2018: Prepared for public release, removed personal files, made improvements and lots of refactoring.
  • Jan 24 ~ 26, 2019: Released it for NodeJS to make the training asynchronous, and other improvements.
  • Sep 4, 2019: Rewrote it using TypeScript and WebSocket for simpler implementation.

Requirements

This project uses lowdb, markov-strings, puppeteer and socket.io-client.
All requirements can be installed with npm install following the installation instructions.
This project was made using NodeJS v10.3.0, it was not tested for any other versions.

Documentation

Getting Started

Install crispybot using npm:

$ npm install crispybot

You can now import and use crispybot like so:

import { Crispy, IJumpInMessage } from "crispybot";

const TOKEN = process.env.JUMPIN_TOKEN || "";
const ROOM = process.env.JUMPIN_ROOM || "Crispybot";
const HANDLE = process.env.JUMPIN_HANDLE || "Crispybot";
const ADMIN = "Crispybot"

const crispy = new Crispy(TOKEN, {
  cooldown: 5, stateSize: 3,
});

crispy.addAdmin(ADMIN);

crispy.addTarget(ADMIN);

crispy.on("connect", () => {
  crispy.join(ROOM);
});

crispy.on("join", (data: any) => {
  console.log(data);
  crispy.handleChange(HANDLE);
});

crispy.on("message", async (data: any) => {
  console.log(data);
});

crispy.addCliCommand("say", (args: string[]) => {
  if (args.length) {
    crispy.message(args.join(" "));
  }
});

crispy.addCommand("nick", async (args: string[], data: IJumpInMessage) => {
  if (args.length) {
    if (await crispy.checkAdmin(data.handle)) {
      crispy.handleChange(args[0]);
    }
  }
});

Contact

Please if you find any bugs let me know by creating an issue on GitHub.
The bot is still under development and many of it's features are not fully tested and need improvements.

License

Crispy - An annoying bot.
Copyright (C) 2019  Guilherme Caulada (Sighmir)

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.