Home

Awesome

hubot-chunkify

npm version

This script relies on a new Hubot v2.17.0 feature known as 'response middleware'. It WILL NOT work on older versions of Hubot.

A Hubot script for handling long messages by chunking them up into shorter messages. Useful for gracefully handling adapters that have a maximum message length. Test it out on hubot help.

Installation via NPM

  1. Install the hubot-chunkify module as a Hubot dependency by running:

    npm install --save hubot-chunkify
    
  2. Enable the module by adding the hubot-chunkify entry to your external-scripts.json file:

    [
        "hubot-chunkify"
    ]
    
  3. Run your bot and see below for available config / commands

Configuration

VariableDefaultDescription
HUBOT_CHUNKIFY_MAX320Any message sent by Hubot that is longer than HUBOT_CHUNKIFY_MAX string characters will be replaced by a series of messages split by newline and HUBOT_CHUNKIFY_MAX.