Ruboty
Ruby + Bot = Ruboty.
Dependencies
- Ruby 3.3 or later
Adapter
Adapter hooks up ruboty to chat services.
- ruboty-slack_events (Slack Events API over Socket Mode)
- ruboty-chatwork
- ruboty-discord
Adapters for services that have shut down or for APIs that are no longer available (Slack XMPP gateway, Slack RTM API, HipChat, Idobata and the Twitter streaming API) were removed from this list.
Brain
Brain persists memories.
Handler
Handler provides various behaviors.
- ruboty-alias
- ruboty-cron
- ruboty-echo
- ruboty-github
- ruboty-kokodeikku
- ruboty-lgtm
- ruboty-syoboi_calendar
Other plugins are hosted on Rubygems.
Configuration
Store configuration value in envorinment variables.
They are easy to change between deploys without changing any code.
We recommend to put .env and run with ruboty --dotenv option to manage them .
All you need to use your favorite plugins is to write their names into Gemfile. Ruboty will load them before running.
# Gemfile
gem "ruboty-cron"
gem "ruboty-redis"
gem "ruboty-slack_events"ENV
DISABLE_DEFAULT_HANDLERS - Pass 1 to disable default handlers (default: nil)
LOG_LEVEL - Log level for debug (default: 3)
RUBOTY_ENV - Loaded gem group name (default: development)
RUBOTY_NAME - Name to respond to mention (default: ruboty)
Deploy
ruboty is a single long-running process and needs no inbound port, so any host that keeps a process or container running will do. See r7kamura/ruboty-template for a ready-to-use setup with a Dockerfile.
docker build -t ruboty .
docker run --env-file .env rubotyWithout Docker, run bundle exec ruboty --dotenv under a process manager such as systemd, and have it restart on failure.
Put settings such as RUBOTY_ENV, RUBOTY_NAME and adapter tokens (for example SLACK_TOKEN and SLACK_APP_TOKEN) in .env.