lib/help.js
function registerHelpListener (controller, helpInfo) {
  controller.hears('^help ' + helpInfo.command + '$', 'direct_mention,direct_message', (bot, message) => {
    let replyText = helpInfo.text

    if (typeof helpInfo.text === 'function') {
      let helpOpts = _.merge({botName: bot.identity.name}, _.pick(message, ['team', 'channel', 'user']))

      replyText = helpInfo.text(helpOpts)
    }

    bot.reply(message, replyText)
  })
}
function registerHelpListener (controller, helpInfo) {
  controller.hears('^help ' + helpInfo.command + '$', 'direct_mention,direct_message', (bot, message) => {
    let replyText = helpInfo.text

    if (typeof helpInfo.text === 'function') {
      let helpOpts = _.merge({botName: bot.identity.name}, _.pick(message, ['team', 'channel', 'user']))

      replyText = helpInfo.text(helpOpts)
    }

    bot.reply(message, replyText)
  })
}
function registerHelpListener ( controller , helpInfo ) { controller . hears ( '^help ' + helpInfo . command + '$' , 'direct_mention,direct_message' , ( bot , message ) => { let replyText = helpInfo . text if ( typeof helpInfo . text === 'function' ) { let helpOpts = _ . merge ( { botName : bot . identity . name } , _ . pick ( message , [ 'team' , 'channel' , 'user' ] ) ) replyText = helpInfo . text ( helpOpts ) } bot . reply ( message , replyText ) } ) }
Adds a single help listener for a plugin

@param controller
@param helpInfo
Adds a single help listener for a plugin