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

hubot-rivescript

v0.1.1

Published

Provides a RiveScript chatbot personality for Hubot.

Downloads

1

Readme

Hubot: hubot-rivescript

Provides a RiveScript chatbot personality for Hubot, using the rivescript JS module.

RiveScript is a simple scripting language for chatbots. See RiveScript.com to learn more about it.

See src/rivescript.coffee for full documentation.

Installation

In your hubot project repo, run:

npm install --save hubot-rivescript

Then add hubot-rivescript to your external-scripts.json:

[
  "hubot-rivescript"
]

Configuration

Use the following environment variables to configure your RiveScript bot:

  • HUBOT_RIVESCRIPT_BRAIN (default ./brain)

    The path on disk to a directory containing RiveScript files (*.rive).

  • HUBOT_RIVESCRIPT_PREFIX (default blank)

    By default, this script responses to all messages directed at the bot (by mentioning its username). This can overlap with other scripts you may have configured; so you can set this variable to require an additional prefix. For example, with HUBOT_RIVESCRIPT_PREFIX="rs" a user must say "hubot rs hello" to get the RiveScript bot to respond.

  • HUBOT_RIVESCRIPT_UTF8 (default 0)

    Enable UTF-8 support within RiveScript. By default, all punctuation and symbols are stripped from the user's input message, and RiveScript triggers can't contain Unicode symbols. Enable UTF-8 mode to lift these restrictions if you want to support non-English users.

    Enable it with HUBOT_RIVESCRIPT_UTF8=1

  • HUBOT_RIVESCRIPT_SYNC (default 0)

    Use synchronous replies instead of async ones. By default, replies are async and you can change that by doing HUBOT_RIVESCRIPT_SYNC=1

    Under the hood, this is the difference between using rs.replyAsync() (default) and rs.reply(); in the latter mode, object macros aren't allowed to return promises but must return string results.

  • HUBOT_RIVESCRIPT_DEBUG (default 0)

    Set this variable to 1 to enable debug mode within RiveScript. This will log verbose internal information to the console and may be useful to help debug loading or matching errors within RiveScript.

Sample Interaction

user1> hubot hello bot
hubot> Hello human!

user1> hubot my name is Alice
hubot> Alice, I'll call you that from now on.

user2> hubot call me Bob
hubot> I'll remember that your name is Bob.

user1> hubot who am I?
hubot> Your name is Alice.

user2> hubot what's my name?
hubot> You told me your name is Bob.

NPM Module

https://www.npmjs.com/package/hubot-rivescript

Author

Noah Petherbridge, @kirsle