Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hubot-command-analytics

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hubot-command-analytics

Some analytics about the hubot command's used

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

hubot-command-analytics

Some analytics about the hubot command's used

See src/command-analytics.coffee for full documentation.

Warning: To date a command is everything used after the robot name.

user1>> hubot cat bomb 1
user1>> hubot cat bomb 2
user1>> hubot cat bomb 3

In the above snippet, the analytics will count 3 different commands (instead of counting only 1 command (hubot cat bomb) 3 times.

Installation

In hubot project repo, run:

npm install hubot-command-analytics --save

Then add hubot-command-analytics to your external-scripts.json:

[
  "hubot-command-analytics"
]

Sample Interaction

user1>> hubot hello
...
user1>> hubot score hello
hubot>> user1 hello: 1
user1>> hubot top
hubot>> user1
.---------------------.
| Score |   Command   |
|-------|-------------|
|     1 | hello       |
|     1 | score hello |
|     1 | top         |
'---------------------'

Availabe Commands

  • score <commands>: how many times has been used
  • top [n] [asc|desc]: Display the n commands order by scores asc or desc. Default n=10, order=desc.

Extension

Every time a command is heard, a command-analytics event is emitted.

robot.on 'command-analytics', (command_analytics) ->
  robot.send command_analytics.user, "The #{command_analytics.command}'s score is: #{command_analytics.score}"

Keywords

FAQs

Package last updated on 20 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc