Skip to content
This repository was archived by the owner on Sep 29, 2025. It is now read-only.

An extension to slack-ruby-bot-server that makes it easy to implement real-time (RTM) bots.

License

Notifications You must be signed in to change notification settings

slack-ruby/slack-ruby-bot-server-rtm

Repository files navigation

Slack Ruby Bot Server RealTime (RTM) Extension

Gem Version test-postgresql test-mongodb

Table of Contents

Introduction

This library is an extension to slack-ruby-bot-server that makes it easy to implement Slack RTM bots.

Samples

You can use one of the sample applications that use MongoDB or ActiveRecord to bootstrap your project and start adding slack command handlers on top of this code.

Usage

Gemfile

Add 'slack-ruby-bot-server-rtm' to Gemfile.

gem 'slack-ruby-bot-server-rtm'

Configure

SlackRubyBotServer::RealTime.configure do |config|
  config.server_class = ...
end

The following settings are supported.

setting description
server_class Handler class for additional events.
Server Class

You can override the server class to handle additional events, and configure the service to use it.

class MyServer < SlackRubyBotServer::Server
  on :hello do |client, data|
    # connected to Slack
  end

  on :channel_joined do |client, data|
    # the bot joined a channel in data.channel['id']
  end
end

SlackRubyBotServer::RealTime.configure do |config|
  config.server_class = MyServer
end

Copyright & License

Copyright Daniel Doubrovkine and Contributors, 2020-2025

MIT License

About

An extension to slack-ruby-bot-server that makes it easy to implement real-time (RTM) bots.

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published