GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - techx/hackmit-hackbot: :robot: HackMIT's personal assistant!

BranchesTags
Open more actions menu

Latest commit

 

History

377 Commits
377 Commits

Folders and files

NameName
Last commit message
Last commit date
bin
bin
 
 
disabled_scripts
disabled_scripts
 
 
scripts
scripts
 
 
.Dockerignore
.Dockerignore
 
 
.editorconfig
.editorconfig
 
 
.env.sample
.env.sample
 
 
.eslintrc.yml
.eslintrc.yml
 
 
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
LICENSE.txt
LICENSE.txt
 
 
MONEY_README.md
MONEY_README.md
 
 
README.md
README.md
 
 
external-scripts.json
external-scripts.json
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 

Repository files navigation

Hackbot 🤖

Development

First, install all the required dependencies with npm install.

npm install

Then, see .env.sample for a list of environment variables that should be set.

cp .env.sample .env

By default, hackbot will run with all the plugins in the scripts/ directory and all the plugins referenced by external-scripts.json. If you only want to test one plugin, move all other plugins to disabled_scripts/ and only include the minimal required external scripts.

mv scripts/* disabled_scripts/
mv disabled_scripts/my_plugin.js scripts/
echo '["hubot-conf","hubot-help"]' > external-scripts.json

If your plugin requires environment variables, be sure to put them in .env. See Configuration for more details.

vi .env
source .env

Finally, run hackbot locally with npm run dev. You will see some logging info and a message prompt.

$ npm run dev
[Set Jul 22 2017 23:16:06 GMT-0400 (EDT)] INFO Using default redis on localhost:6379
hackbot>

Now you can interact with hackbot by typing hackbot help or any other supported command.

$ npm run dev
[Set Jul 22 2017 23:16:06 GMT-0400 (EDT)] INFO Using default redis on localhost:6379
hackbot> hackbot ping
hackbot> PONG

If you make changes, quit with Ctrl+C and restart hackbot with npm run dev.

Configuration

Most of the plugins in scripts/ use hubot-conf to access configuration values from the HackMIT Slack. That means that in order to run them locally, you need to copy some configuration values from Slack into your .env.

To do this, in Slack #botspam type hackbot conf dump. Find the variables you need, and copy them into .env.

Be sure to follow hubot-conf convention, mapping package.name.property.name from Slack to HUBOT_PACKAGE_NAME_PROPERTY_NAME in .env.

Source Key name Example usage
Slack example.hello example.hello = "hello"
Environment variable HUBOT_EXAMPLE_HELLO export HUBOT_EXAMPLE_HELLO="hello"

Examples

You can see some more example scripts here.

About

🤖 HackMIT's personal assistant!

Topics

coffeescripthubot

Resources

Readme
MIT license
Activity
Custom properties

Stars

15 stars

Watchers

48 watching

Forks

4 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.