Skip to content

A simple Slack bot that allows to ask for Ruby Core/Stdlib documentation.

License

Notifications You must be signed in to change notification settings

tbalthazar-archives/ribot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RiBot

                _____
               /_____\
          ____[\`---'/]____
         /\ #\ \_____/ /# /\
        /  \# \_.---._/ #/  \
       /   /|\  |   |  /|\   \      RiBot - The Ruby API Reference Bot
      /___/ | | |   | | | \___\
      |  |  | | |---| | |  |  |     
      |__|  \_| |_#_| |_/  |__|     
      //\\  <\ _//^\\_ />  //\\     
      \||/  |\//// \\\\/|  \||/
            |   |   |   |           
            |---|   |---|
            |---|   |---|
            |   |   |   |
            |___|   |___|
            /   \   /   \
           |_____| |_____|
           |HHHHH| |HHHHH|

RiBot is a simple Slack bot that answers your questions about the Ruby Core/Stdlib documentation.
RiBot uses the ri CLI tool to provide documentation.

Getting Started

1. Create a new bot user in your Slack account:

2. Clone this repository:

$ git clone https://github.com/tbalthazar/ribot.git

3. Change directory to ribot and run the setup script:

It will install the ri documentation for all your installed gems, it might take a while.

$ cd ribot
$ script/setup

4. Run the ribot client:

$ TOKEN=your-slack-api-token script/run

5. Open Slack and type the following command:

/msg @ribot help

Usage

In the channels where the bot has been invited, type one of the following commands:

  • ri Array#sort
  • @ribot Array#sort
    Or send the bot a direct message:
  • /msg @ribot Array#sort

To invite the bot to a channel, enter a channel and type:

  • /invite @ribot

Token

The bot needs a Slack API Token to work properly. The script/run script will:

  1. look for a TOKEN environment variable
  2. if not found, it will try to read the token from the .token file
  3. if no .token file exists, it will prompt for the token

Tests

You can run the tests using:

$ script/test

License

Please see LICENSE for licensing details.

About

A simple Slack bot that allows to ask for Ruby Core/Stdlib documentation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published