Code Monkey home page Code Monkey logo

slack-bot-server's People

Contributors

confact avatar corprew avatar dblock avatar jakcharlton avatar keydunov avatar lazyatom avatar zjvandeweg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

slack-bot-server's Issues

I'm having to repeat the RemoteControl.new command in the console

I'm able to successfully add a bot to the server and broadcast a message using slack_remote from the console, however I always get an error the first time I use this command in the console:
slack_remote = SlackBotServer::RemoteControl.new(queue: queue)

This is not a critical problem, and it may not be related to the gem. If I repeat the command immediately after it failed, then it works. Here's the console output showing it working:

$ require 'slack_bot_server'
  => true
$ reload!
  Reloading...
  => true 
$ queue = SlackBotServer::RedisQueue.new(Redis.new)
  => #<SlackBotServer::RedisQueue:0x007ff6b3278b50 @key="slack_bot_server:queue", @redis=#<Redis client v3.2.2 for redis://127.0.0.1:6379/0>> 
$ slack_remote = SlackBotServer::RemoteControl.new(queue: queue)
  LoadError: Unable to autoload constant RemoteControl, expected     /Users/lucas/Desktop/ruby/bb2/app/models/remote_control.rb to define it
  from /Users/lucas/.rvm/gems/ruby-2.2.0@qiqo/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:495:in `load_missing_constant'
  from /Users/lucas/.rvm/gems/ruby-2.2.0@qiqo/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:184:in `const_missing'
  from /Users/lucas/.rvm/gems/ruby-2.2.0@qiqo/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:526:in `load_missing_constant'
  from /Users/lucas/.rvm/gems/ruby-2.2.0@qiqo/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:184:in `const_missing'
  from (irb):4
  from /Users/lucas/.rvm/gems/ruby-2.2.0@qiqo/gems/railties-4.2.0/lib/rails/commands/console.rb:110:in `start'
  from /Users/lucas/.rvm/gems/ruby-2.2.0@qiqo/gems/railties-4.2.0/lib/rails/commands/console.rb:9:in `start'
  from /Users/lucas/.rvm/gems/ruby-2.2.0@qiqo/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:68:in `console'
  from /Users/lucas/.rvm/gems/ruby-2.2.0@qiqo/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
  from /Users/lucas/.rvm/gems/ruby-2.2.0@qiqo/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
  from bin/rails:4:in `require'
  from bin/rails:4:in `<main>'
$ slack_remote = SlackBotServer::RemoteControl.new(queue: queue)
  => #<SlackBotServer::RemoteControl:0x007ff6b3b895c8 @queue=#<SlackBotServer::RedisQueue:0x007ff6b3278b50 @key="slack_bot_server:queue", @redis=#<Redis client v3.2.2 for redis://127.0.0.1:6379/0>>> 
$ slack_remote.add_token('the-token-goes-here')
  => 1
$ slack_remote.say('the-token-goes-here', text: 'I have an important announcement to make!')
  => 1

Having to repeat the command is not what I'd expect. Does this indicate that anything is wrong with the gem or with how I've set up this app?

In case it's helpful, here's remote_control.rb:

class SlackBotServer::RemoteControl
  def initialize(queue:)
    @queue = queue
  end

  def add_token(token)
    @queue.push([:add_token, token])
  end

  def remove_bot(key)
    @queue.push([:remove_bot, key])
  end

  def broadcast(key, message_data)
    @queue.push([:broadcast, key, message_data])
  end

  def say(key, message_data)
    @queue.push([:say, key, message_data])
  end

  def say_to(key, user_id, message_data)
    @queue.push([:say_to, key, user_id, message_data])
  end

  def call(key, method, args)
    @queue.push([:call, [key, method, args]])
  end
end

Question about slack-bot-server on Heroku

If this is the Procfile in a Rails app on Heroku...

web: bundle exec puma -C config/puma.rb
worker: bundle exec rake jobs:work
slack_server: bundle exec rails runner bin/slack_server

...then for every Heroku Dyno that spins up, it will have a slack-bot-server instance too, I believe. Is that redundant because there will be multpile slack-bot-servers monitoring each of the Slack teams?

I guess I could stand up slack-bot-server on its own dyno as a separate app, but I'd like to keep it connected to the main Rails app. Any other suggestions?

Logging hooks

suggestion / question

We've started using the slack-bot-server in our product and really like what it does. One improvement I wanted to make was to have it log unhandled exceptions to an error logging component or service of choice, and being able to configure that. At the moment, the only thing the server does is writing errors to the log.

To workaround, I monkey patched the log_error method like below.

module SlackBotServer::Logging
  def log_error(e, *args)
    message = "#{e} - #{e.message}"
    message += " (#{log_string(*args)})" if args.any?

    # note I changes the log levels from the defaults here as well.
    SlackBotServer.logger.error("#{message}")
    SlackBotServer.logger.debug(e.backtrace.join("\n"))

    # do custom error reporting/handling here.
    Rollbar.error(e, message)
  end
end

I went this route after looking at extending the gem sources in a way to make this less of a patch. But I didn't get to a solution that I felt good enough to submit a pull request.

Alternatives I tried were along the same line as what the gem does today in allowing you to override the SlackBotServer.logger or how you allow on_add and other hooks.

Has this been considered? Suggestions?

Based on feedback I'll be happy to work on what I started some more and submit a PR.

Cannot use `call` command

I am trying to use https://github.com/exciting-io/slack-bot-server/blob/master/lib/slack_bot_server/remote_control.rb#L57. My invocation looks like:

server.call(key, 'users.list', [])

When process_instruction handles this, the following occurs:

    1: class SlackBotServer::Server
    2:   def process_instruction(instruction)
 => 3:     binding.pry
    4:     type, *args = instruction
    5:     bot_key = args.shift
    6:     if type.to_sym == :add_bot
    7:       log "adding bot: #{bot_key} #{args.inspect}"
    8:       add_bot(bot_key, *args)

[1] pry(#<SlackBotServer::Server>)> instruction
=> ["call", ["XXX", "users.list", []]]
[2] pry(#<SlackBotServer::Server>)> type, *args = instruction
=> ["call", ["XXX", "users.list", []]]
[3] pry(#<SlackBotServer::Server>)> args
=> [["XXX", "users.list", []]]
[4] pry(#<SlackBotServer::Server>)> args.shift
=> ["XXX", "users.list", []]

The entire array content is being used for bot_key rather than just the key part of it. The call command fails due to this.

I'm using ruby 2.3.1.

Server crashes on boot-up when bad token is included.

Using the advanced example, we loop through the bot tokens in our database and add them before the server starts. However, if there is a bad token, the whole server crashes. The server should instead log a warning for the bad token, and continue to boot.

Code

queue = SlackBotServer::RedisQueue.new

server = SlackBotServer::Server.new(queue: queue)

server.on_add do |token|
  VinnyBot.new(token: token)
end

User.find_each do |user|
  server.add_bot(user.bot_token) if user.bot_token.present?
end

server.start

Backtrace

2016-08-01T15:59:33.966624+00:00 heroku[slack_server.1]: State changed from crashed to starting
2016-08-01T15:59:39.993589+00:00 heroku[slack_server.1]: Starting process with command `bundle exec rails runner bin/slack_server.rb`
2016-08-01T15:59:40.655054+00:00 heroku[slack_server.1]: State changed from starting to up
2016-08-01T15:59:45.275205+00:00 app[slack_server.1]: ** [NewRelic][2016-08-01 15:59:45 +0000 slack_server.1 (3)] INFO : Starting the New Relic agent in "production" environment.
2016-08-01T15:59:45.275246+00:00 app[slack_server.1]: ** [NewRelic][2016-08-01 15:59:45 +0000 slack_server.1 (3)] INFO : To prevent agent startup add a NEW_RELIC_AGENT_ENABLED=false environment variable or modify the "production" section of your newrelic.yml.
2016-08-01T15:59:45.275247+00:00 app[slack_server.1]: ** [NewRelic][2016-08-01 15:59:45 +0000 slack_server.1 (3)] INFO : Reading configuration from config/newrelic.yml (/app)
2016-08-01T15:59:45.280046+00:00 app[slack_server.1]: ** [NewRelic][2016-08-01 15:59:45 +0000 slack_server.1 (3)] INFO : Environment: production
2016-08-01T15:59:45.280080+00:00 app[slack_server.1]: ** [NewRelic][2016-08-01 15:59:45 +0000 slack_server.1 (3)] INFO : No known dispatcher detected.
2016-08-01T15:59:45.280110+00:00 app[slack_server.1]: ** [NewRelic][2016-08-01 15:59:45 +0000 slack_server.1 (3)] INFO : Application: VG Pizza
2016-08-01T15:59:45.318022+00:00 app[slack_server.1]: ** [NewRelic][2016-08-01 15:59:45 +0000 slack_server.1 (3)] INFO : Installing deferred Rack::Builder instrumentation
2016-08-01T15:59:45.318166+00:00 app[slack_server.1]: ** [NewRelic][2016-08-01 15:59:45 +0000 slack_server.1 (3)] INFO : Installing Rack::Builder middleware instrumentation
2016-08-01T15:59:45.319382+00:00 app[slack_server.1]: ** [NewRelic][2016-08-01 15:59:45 +0000 slack_server.1 (3)] INFO : Installing Sidekiq instrumentation
2016-08-01T15:59:45.319557+00:00 app[slack_server.1]: ** [NewRelic][2016-08-01 15:59:45 +0000 slack_server.1 (3)] INFO : Installing ActiveRecord 4+ instrumentation
2016-08-01T15:59:45.332822+00:00 app[slack_server.1]: ** [NewRelic][2016-08-01 15:59:45 +0000 slack_server.1 (3)] INFO : Installing ActiveJob instrumentation
2016-08-01T15:59:45.345692+00:00 app[slack_server.1]: ** [NewRelic][2016-08-01 15:59:45 +0000 slack_server.1 (3)] INFO : Installing Rails 3+ middleware instrumentation
2016-08-01T15:59:45.346276+00:00 app[slack_server.1]: ** [NewRelic][2016-08-01 15:59:45 +0000 slack_server.1 (3)] INFO : Installing Net instrumentation
2016-08-01T15:59:45.348721+00:00 app[slack_server.1]: ** [NewRelic][2016-08-01 15:59:45 +0000 slack_server.1 (3)] INFO : Installing Redis Instrumentation
2016-08-01T15:59:45.349027+00:00 app[slack_server.1]: ** [NewRelic][2016-08-01 15:59:45 +0000 slack_server.1 (3)] INFO : Installing Rails 4 view instrumentation
2016-08-01T15:59:45.349145+00:00 app[slack_server.1]: ** [NewRelic][2016-08-01 15:59:45 +0000 slack_server.1 (3)] INFO : Installing Rails 4 Controller instrumentation
2016-08-01T15:59:45.349283+00:00 app[slack_server.1]: ** [NewRelic][2016-08-01 15:59:45 +0000 slack_server.1 (3)] INFO : Installing Rails 4 Error instrumentation
2016-08-01T15:59:45.349354+00:00 app[slack_server.1]: ** [NewRelic][2016-08-01 15:59:45 +0000 slack_server.1 (3)] INFO : Finished instrumentation
2016-08-01T15:59:46.222921+00:00 app[slack_server.1]: ** [NewRelic][2016-08-01 15:59:46 +0000 slack_server.1 (3)] INFO : Installing Sinatra instrumentation
2016-08-01T15:59:46.310275+00:00 app[slack_server.1]:   User Load (7.2ms)  SELECT  "users".* FROM "users"  ORDER BY "users"."id" ASC LIMIT 1000
2016-08-01T15:59:46.334842+00:00 app[slack_server.1]: I, [2016-08-01T15:59:46.334748 #3]  INFO -- :  adding bot <VinnyBot key:xoxb-xxx>
2016-08-01T15:59:46.336049+00:00 app[slack_server.1]: I, [2016-08-01T15:59:46.336001 #3]  INFO -- :  adding bot <VinnyBot key:xoxb-xxx>
2016-08-01T15:59:46.337910+00:00 app[slack_server.1]: I, [2016-08-01T15:59:46.337870 #3]  INFO -- :  adding bot <VinnyBot key:xoxb-xxx>
2016-08-01T15:59:46.339088+00:00 app[slack_server.1]: I, [2016-08-01T15:59:46.339047 #3]  INFO -- :  adding bot <VinnyBot key:xoxb-xxx>
2016-08-01T15:59:46.339577+00:00 app[slack_server.1]: I, [2016-08-01T15:59:46.339538 #3]  INFO -- :  adding bot <VinnyBot key:xoxb-xxx>
2016-08-01T15:59:46.593135+00:00 app[slack_server.1]: ** [NewRelic][2016-08-01 15:59:46 +0000 slack_server.1 (3)] INFO : Reporting to: https://rpm.newrelic.com/accounts/xxx/applications/xxx
2016-08-01T15:59:48.116231+00:00 app[slack_server.1]: ** [NewRelic][2016-08-01 15:59:48 +0000 slack_server.1 (3)] INFO : Starting Agent shutdown
2016-08-01T15:59:48.251224+00:00 app[slack_server.1]: /app/vendor/bundle/ruby/2.3.0/gems/slack-bot-server-0.4.6/lib/slack_bot_server/bot.rb:181:in `rescue in start': account_inactive (SlackBotServer::Bot::ConnectionError)
2016-08-01T15:59:48.251227+00:00 app[slack_server.1]:   from /app/vendor/bundle/ruby/2.3.0/gems/slack-bot-server-0.4.6/lib/slack_bot_server/bot.rb:152:in `start'
2016-08-01T15:59:48.251228+00:00 app[slack_server.1]:   from /app/vendor/bundle/ruby/2.3.0/gems/slack-bot-server-0.4.6/lib/slack_bot_server/server.rb:82:in `block (2 levels) in start'
2016-08-01T15:59:48.251229+00:00 app[slack_server.1]:   from /app/vendor/bundle/ruby/2.3.0/gems/slack-bot-server-0.4.6/lib/slack_bot_server/server.rb:82:in `each'
2016-08-01T15:59:48.251230+00:00 app[slack_server.1]:   from /app/vendor/bundle/ruby/2.3.0/gems/slack-bot-server-0.4.6/lib/slack_bot_server/server.rb:82:in `block in start'
2016-08-01T15:59:48.251233+00:00 app[slack_server.1]:   from /app/vendor/bundle/ruby/2.3.0/gems/eventmachine-1.2.0.1/lib/eventmachine.rb:194:in `run_machine'
2016-08-01T15:59:48.251234+00:00 app[slack_server.1]:   from /app/vendor/bundle/ruby/2.3.0/gems/eventmachine-1.2.0.1/lib/eventmachine.rb:194:in `run'
2016-08-01T15:59:48.251234+00:00 app[slack_server.1]:   from /app/vendor/bundle/ruby/2.3.0/gems/slack-bot-server-0.4.6/lib/slack_bot_server/server.rb:80:in `start'
2016-08-01T15:59:48.251236+00:00 app[slack_server.1]:   from bin/slack_server.rb:26:in `<top (required)>'
2016-08-01T15:59:48.251236+00:00 app[slack_server.1]:   from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5.1/lib/rails/commands/runner.rb:60:in `load'
2016-08-01T15:59:48.251237+00:00 app[slack_server.1]:   from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5.1/lib/rails/commands/runner.rb:60:in `<top (required)>'
2016-08-01T15:59:48.251238+00:00 app[slack_server.1]:   from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:123:in `require'
2016-08-01T15:59:48.251240+00:00 app[slack_server.1]:   from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:123:in `require_command!'
2016-08-01T15:59:48.251241+00:00 app[slack_server.1]:   from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:90:in `runner'
2016-08-01T15:59:48.251242+00:00 app[slack_server.1]:   from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
2016-08-01T15:59:48.251243+00:00 app[slack_server.1]:   from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5.1/lib/rails/commands.rb:17:in `<top (required)>'
2016-08-01T15:59:48.251245+00:00 app[slack_server.1]:   from bin/rails:4:in `require'
2016-08-01T15:59:48.251245+00:00 app[slack_server.1]:   from bin/rails:4:in `<main>'
2016-08-01T15:59:48.398640+00:00 heroku[slack_server.1]: Process exited with status 1
2016-08-01T15:59:48.418994+00:00 heroku[slack_server.1]: State changed from up to crashed

Gaps in the README

After a bit of messing around I was finally able to get this working. A few things that seem to be missing in the documentation/README:

  • I had to manually require the library in my gemfile gem 'slack-bot-server', :require => 'slack_bot_server'
  • It looks like the library is dependent on the redis gem, but not included in the libraries Gemfile so I needed to add that to my Gemfile as well gem 'redis'
  • in order to access the remote control library I had to first manually require it require 'slack_bot_server/remote_control'
  • in order to retrieve a bot token I need to include the bot scope when authenticating with Slack
  • in order to send messages from my bot I need to include the chat:bot:write scope
  • in order to use the remote control say feature I needed to provide a channel with :channel => 'some-channel-name'

interactive message support

I plan to use this as my bot server but I would need interactive message support.

How would I be able to support that? If you don't have time to do it yourself, could you point some way and I will try to add it, it is important for me that I can do interactive messages.

Talking to main app

Hey guys,

Slack-bot-server is exactly what I've been looking for! Awesome work :)

I'm trying to figure out how I can interact with my main app from inside of slack-bot-server. At the moment I have my code living in lib/slackbots/ and I load it via forman with slackbot: ./lib/slack-bot-server.

Do you have any suggestions on how I would do it?

Cheers

Josh

Error with using 'reply' in the on :message block

Hi,

I got an error when I try to use the on :message hook.

I, [2016-03-30T01:46:44.693127 #2228]  INFO -- : [BOT/bot] {:error=>#<NoMethodError: undefined method `[]' for nil:NilClass>}
I, [2016-03-30T01:46:44.693604 #2228]  INFO -- : [BOT/bot] {:backtrace=>["/Users/K/.rvm/gems/ruby-2.2.1/gems/slack-bot-server-0.4.2/lib/slack_bot_server/bot.rb:116:in `reply'",

Inside my bot class, I did this:

  on(:message) do |data|
    reply text: "Hello."
  end

It looks like the @last_received_data in the reply method (line 116 in bot.rb) is nil for some reason. Any idea what's wrong here?

Support to handle file uploads in IM

My bot will handle files that get sent to the bot in IM, and now it gives an error message when I send a file to the bot.

W, [2017-10-07T18:52:02.425802 #23047]  WARN -- : ERROR: undefined method `merge!' for nil:NilClass - undefined method `merge!' for nil:NilClass
W, [2017-10-07T18:52:02.426239 #23047]  WARN -- : /home/vagrant/.rvm/gems/ruby-2.3.3/gems/slack-bot-server-0.4.7/lib/slack_bot_server/bot.rb:331:in `block in on_im'
/home/vagrant/.rvm/gems/ruby-2.3.3/gems/slack-bot-server-0.4.7/lib/slack_bot_server/bot.rb:368:in `instance_exec'
/home/vagrant/.rvm/gems/ruby-2.3.3/gems/slack-bot-server-0.4.7/lib/slack_bot_server/bot.rb:368:in `block in run_callbacks'
/home/vagrant/.rvm/gems/ruby-2.3.3/gems/slack-bot-server-0.4.7/lib/slack_bot_server/bot.rb:367:in `each'
/home/vagrant/.rvm/gems/ruby-2.3.3/gems/slack-bot-server-0.4.7/lib/slack_bot_server/bot.rb:367:in `run_callbacks'
/home/vagrant/.rvm/gems/ruby-2.3.3/gems/slack-bot-server-0.4.7/lib/slack_bot_server/bot.rb:362:in `handle_message'
/home/vagrant/.rvm/gems/ruby-2.3.3/gems/slack-bot-server-0.4.7/lib/slack_bot_server/bot.rb:165:in `block in start'
/home/vagrant/.rvm/gems/ruby-2.3.3/gems/slack-ruby-client-0.10.0/lib/slack/real_time/client.rb:198:in `block in run_callbacks'
/home/vagrant/.rvm/gems/ruby-2.3.3/gems/slack-ruby-client-0.10.0/lib/slack/real_time/client.rb:197:in `each'
/home/vagrant/.rvm/gems/ruby-2.3.3/gems/slack-ruby-client-0.10.0/lib/slack/real_time/client.rb:197:in `run_callbacks'
/home/vagrant/.rvm/gems/ruby-2.3.3/gems/slack-ruby-client-0.10.0/lib/slack/real_time/client.rb:178:in `dispatch'
/home/vagrant/.rvm/gems/ruby-2.3.3/gems/slack-ruby-client-0.10.0/lib/slack/real_time/client.rb:93:in `block (2 levels) in run_loop'
/home/vagrant/.rvm/gems/ruby-2.3.3/gems/websocket-driver-0.6.5/lib/websocket/driver/event_emitter.rb:39:in `block in emit'
/home/vagrant/.rvm/gems/ruby-2.3.3/gems/websocket-driver-0.6.5/lib/websocket/driver/event_emitter.rb:38:in `each'
/home/vagrant/.rvm/gems/ruby-2.3.3/gems/websocket-driver-0.6.5/lib/websocket/driver/event_emitter.rb:38:in `emit'
/home/vagrant/.rvm/gems/ruby-2.3.3/gems/faye-websocket-0.10.7/lib/faye/websocket/api/event_target.rb:44:in `dispatch_event'
/home/vagrant/.rvm/gems/ruby-2.3.3/gems/faye-websocket-0.10.7/lib/faye/websocket/api.rb:113:in `receive_message'
/home/vagrant/.rvm/gems/ruby-2.3.3/gems/faye-websocket-0.10.7/lib/faye/websocket/api.rb:45:in `block in initialize'
/home/vagrant/.rvm/gems/ruby-2.3.3/gems/websocket-driver-0.6.5/lib/websocket/driver/event_emitter.rb:39:in `block in emit'
/home/vagrant/.rvm/gems/ruby-2.3.3/gems/websocket-driver-0.6.5/lib/websocket/driver/event_emitter.rb:38:in `each'
/home/vagrant/.rvm/gems/ruby-2.3.3/gems/websocket-driver-0.6.5/lib/websocket/driver/event_emitter.rb:38:in `emit'

Help getting started

After fixing the gem name, I got the server up and running, but I can't get it to recognise a bot

Unknown bot: XXXX-21908568258-mgPBY9xwF9xdhHzF7q1n602E

This is (obfuscated above) a valid Bot token in slack - but just throws this error

The problem is made slightly trickier by not having a any 'good' way to debug - putting puts or debugger in the .on method doesnt get hit - it seems to fail long before that proc is even called

Any suggestions here?

edit: probably should add, running under Rails 4.2, with spring stop;bin/rails runner bin/slack_server
edit: using the sample bot SimpleBot and sample SlackServer

Questions about How to Use

Hello, thanks for writing this gem.

I'm looking through the documentation and these are the questions that come to mind:

  1. To use Foreman to start the SimpleBot server, I'm assuming we add a line to the Procfile. What would that line look like?

  2. For the Advanced Example to work, do we have to install anything extra such as a Gem to make Harmonia work? In other words, what is this connecting to...

    require 'harmonia/slack_bot'

Bot keeps disconnecting and reconnecting twice

Hey,
First, thank you for implementing this awesome library 👍

Somehow my Slackserver is quite unstable. I keep getting disconnects (which is fine by itself), but after that, TWO Bots connect. So every incoming message is getting processed twice by my system. And this effect keeps stacking, so I ended up with 7 connections sometimes, that then lead to the Too Many requests� API error.
I stumbled upon slack-ruby/slack-ruby-client@9934f02 but not sure if related.

Do you have an idea how to fix this?

Thank you,
Mirko

Versions

Using slack-ruby-client 0.14.2
Using slack-bot-server 0.4.7

Log


2019-08-14T03:43:12.653171823Z app[slack.1]: New Slack Message: channel=CL3TXJTLL, event_ts=1565753962.001800, hidden=true, message=attachments=[#<Slack::Messages::Message fallback="Paweł U. | Ruby on Rails Web Development Consultant Full Stack Blog: Migrate a Rails App from Heroku to Dokku [Step by Step Tutorial]" from_url="https://pawelurbanek.com/rails-heroku-dokku-migration" id=1 image_bytes=123721 image_height=250 image_url="https://pawelurbanek.com/assets/dokku-containers-543a4920f96e8686f14f330c9c37b2d4fce2ce571f34774894f75ba594c00078.jpg" image_width=400 original_url="https://pawelurbanek.com/rails-heroku-dokku-migration" service_icon="https://pawelurbanek.com/apple-touch-icon-57x57.png" service_name="Paweł U. | Ruby on Rails Web Development Consultant Full Stack Blog" text="Dokku is dev ops for dummies and a cheaper alternative to Heroku. Recently I've migrated a couple of my projects to it. In this blog post, I will describe how to setup and migrate a Rails app to Dokku with PostgreSQL, Sidekiq, Redis and Let's Encrypt or Cloudflare for free SSL." title="Migrate a Rails App from Heroku to Dokku [Step by Step Tutorial]" title_link="https://pawelurbanek.com/rails-heroku-dokku-migration" ts=1523250037>], client_msg_id=b95cb068-a4f2-4719-b222-ba9fddd0e9e0, team=TL3K7E8CV, text=<https://pawelurbanek.com/rails-heroku-dokku-migration>, ts=1565753961.001700, type=message, user=UL351D6CC, previous_message=client_msg_id=b95cb068-a4f2-4719-b222-ba9fddd0e9e0, team=TL3K7E8CV, text=<https://pawelurbanek.com/rails-heroku-dokku-migration>, ts=1565753961.001700, type=message, user=UL351D6CC, subtype=message_changed, ts=1565753962.001800, type=message
2019-08-14T03:43:12.653638862Z app[slack.1]: D, [2019-08-14T03:39:22.514390 #8] DEBUG -- :   Team Load (0.7ms)  SELECT "teams".* FROM "teams" WHERE "teams"."id" = $1 LIMIT $2  [["id", 5], ["LIMIT", 1]]
2019-08-14T03:43:12.654250091Z app[slack.1]: I, [2019-08-14T03:41:21.460777 #8]  INFO -- : [BOT/postwave] disconnected
2019-08-14T03:43:12.654293758Z app[slack.1]: I, [2019-08-14T03:41:22.026071 #8]  INFO -- : [BOT/postwave] connected to 'Postwave'
2019-08-14T03:43:12.654393675Z app[slack.1]: I, [2019-08-14T03:41:22.029442 #8]  INFO -- : [BOT/postwave] connected to 'Postwave'
2019-08-14T03:43:12.654420730Z app[slack.1]: D, [2019-08-14T03:43:09.629051 #8] DEBUG -- : [BOT/postwave] {:message=>#<Slack::Messages::Message channel="CL3TXJTLL" client_msg_id="de06f3fa-091f-488d-a735-3563098e157b" event_ts="1565754189.002000" source_team="TL3K7E8CV" suppress_notification=false team="TL3K7E8CV" text="<https://www.quora.com/What-is-Phoenixs-alternative-for-Rails-devise>" ts="1565754189.002000" type="message" user="UL351D6CC" user_team="TL3K7E8CV">}
2019-08-14T03:43:12.654529240Z app[slack.1]: D, [2019-08-14T03:43:09.630379 #8] DEBUG -- : [BOT/postwave] {:on_message=>#<Slack::Messages::Message channel="CL3TXJTLL" client_msg_id="de06f3fa-091f-488d-a735-3563098e157b" event_ts="1565754189.002000" source_team="TL3K7E8CV" suppress_notification=false team="TL3K7E8CV" text="<https://www.quora.com/What-is-Phoenixs-alternative-for-Rails-devise>" ts="1565754189.002000" type="message" user="UL351D6CC" user_team="TL3K7E8CV">, :bot_message=>false}
2019-08-14T03:43:12.654556563Z app[slack.1]: D, [2019-08-14T03:43:09.630933 #8] DEBUG -- : [BOT/postwave] {:on_im=>#<Slack::Messages::Message channel="CL3TXJTLL" client_msg_id="de06f3fa-091f-488d-a735-3563098e157b" event_ts="1565754189.002000" source_team="TL3K7E8CV" suppress_notification=false team="TL3K7E8CV" text="<https://www.quora.com/What-is-Phoenixs-alternative-for-Rails-devise>" ts="1565754189.002000" type="message" user="UL351D6CC" user_team="TL3K7E8CV">, :bot_message=>false, :is_im_channel=>false}
2019-08-14T03:43:12.654669684Z app[slack.1]: New Slack Message: channel=CL3TXJTLL, client_msg_id=de06f3fa-091f-488d-a735-3563098e157b, event_ts=1565754189.002000, source_team=TL3K7E8CV, suppress_notification=false, team=TL3K7E8CV, text=<https://www.quora.com/What-is-Phoenixs-alternative-for-Rails-devise>, ts=1565754189.002000, type=message, user=UL351D6CC, user_team=TL3K7E8CV
2019-08-14T03:43:12.654693050Z app[slack.1]: D, [2019-08-14T03:43:09.637072 #8] DEBUG -- :   Team Load (2.0ms)  SELECT "teams".* FROM "teams" WHERE "teams"."id" = $1 LIMIT $2  [["id", 5], ["LIMIT", 1]]
2019-08-14T03:43:12.654816945Z app[slack.1]: D, [2019-08-14T03:43:09.647878 #8] DEBUG -- :    (0.7ms)  BEGIN
2019-08-14T03:43:12.654843112Z app[slack.1]: D, [2019-08-14T03:43:09.650059 #8] DEBUG -- :   Post Create (1.2ms)  INSERT INTO "posts" ("team_id", "text", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"  [["team_id", 5], ["text", "<https://www.quora.com/What-is-Phoenixs-alternative-for-Rails-devise>"], ["created_at", "2019-08-14 03:43:09.644393"], ["updated_at", "2019-08-14 03:43:09.644393"]]
2019-08-14T03:43:12.655271364Z app[slack.1]: D, [2019-08-14T03:43:09.655344 #8] DEBUG -- :   Post Update (1.0ms)  UPDATE "posts" SET "text" = $1, "updated_at" = $2 WHERE "posts"."id" = $3  [["text", "https://www.quora.com/What-is-Phoenixs-alternative-for-Rails-devise"], ["updated_at", "2019-08-14 03:43:09.652506"], ["id", 82]]
2019-08-14T03:43:12.655315846Z app[slack.1]: https://www.quora.com/What-is-Phoenixs-alternative-for-Rails-devise is missing attributes, could not create preview
2019-08-14T03:43:12.655431561Z app[slack.1]: https://www.quora.com/What-is-Phoenixs-alternative-for-Rails-devise is missing attributes, could not create preview
2019-08-14T03:43:12.655450769Z app[slack.1]: https://www.quora.com/What-is-Phoenixs-alternative-for-Rails-devise is missing attributes, could not create preview
2019-08-14T03:43:12.655518890Z app[slack.1]: D, [2019-08-14T03:43:11.126618 #8] DEBUG -- :    (1.1ms)  COMMIT
2019-08-14T03:43:12.655538406Z app[slack.1]: D, [2019-08-14T03:43:11.127923 #8] DEBUG -- : [BOT/postwave] {:message=>#<Slack::Messages::Message channel="CL3TXJTLL" client_msg_id="de06f3fa-091f-488d-a735-3563098e157b" event_ts="1565754189.002000" source_team="TL3K7E8CV" suppress_notification=false team="TL3K7E8CV" text="<https://www.quora.com/What-is-Phoenixs-alternative-for-Rails-devise>" ts="1565754189.002000" type="message" user="UL351D6CC" user_team="TL3K7E8CV">}
2019-08-14T03:43:12.655634580Z app[slack.1]: D, [2019-08-14T03:43:11.128120 #8] DEBUG -- : [BOT/postwave] {:on_message=>#<Slack::Messages::Message channel="CL3TXJTLL" client_msg_id="de06f3fa-091f-488d-a735-3563098e157b" event_ts="1565754189.002000" source_team="TL3K7E8CV" suppress_notification=false team="TL3K7E8CV" text="<https://www.quora.com/What-is-Phoenixs-alternative-for-Rails-devise>" ts="1565754189.002000" type="message" user="UL351D6CC" user_team="TL3K7E8CV">, :bot_message=>false}
2019-08-14T03:43:12.655678017Z app[slack.1]: D, [2019-08-14T03:43:11.128274 #8] DEBUG -- : [BOT/postwave] {:on_im=>#<Slack::Messages::Message channel="CL3TXJTLL" client_msg_id="de06f3fa-091f-488d-a735-3563098e157b" event_ts="1565754189.002000" source_team="TL3K7E8CV" suppress_notification=false team="TL3K7E8CV" text="<https://www.quora.com/What-is-Phoenixs-alternative-for-Rails-devise>" ts="1565754189.002000" type="message" user="UL351D6CC" user_team="TL3K7E8CV">, :bot_message=>false, :is_im_channel=>false}
2019-08-14T03:43:12.655770742Z app[slack.1]: New Slack Message: channel=CL3TXJTLL, client_msg_id=de06f3fa-091f-488d-a735-3563098e157b, event_ts=1565754189.002000, source_team=TL3K7E8CV, suppress_notification=false, team=TL3K7E8CV, text=<https://www.quora.com/What-is-Phoenixs-alternative-for-Rails-devise>, ts=1565754189.002000, type=message, user=UL351D6CC, user_team=TL3K7E8CV
2019-08-14T03:43:12.655809798Z app[slack.1]: D, [2019-08-14T03:43:11.129350 #8] DEBUG -- :   Team Load (0.5ms)  SELECT "teams".* FROM "teams" WHERE "teams"."id" = $1 LIMIT $2  [["id", 5], ["LIMIT", 1]]
2019-08-14T03:43:12.655928518Z app[slack.1]: D, [2019-08-14T03:43:11.131802 #8] DEBUG -- :    (0.3ms)  BEGIN
2019-08-14T03:43:12.655949959Z app[slack.1]: D, [2019-08-14T03:43:11.133176 #8] DEBUG -- :   Post Create (0.7ms)  INSERT INTO "posts" ("team_id", "text", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"  [["team_id", 5], ["text", "<https://www.quora.com/What-is-Phoenixs-alternative-for-Rails-devise>"], ["created_at", "2019-08-14 03:43:11.130764"], ["updated_at", "2019-08-14 03:43:11.130764"]]
2019-08-14T03:43:12.656115486Z app[slack.1]: D, [2019-08-14T03:43:11.136710 #8] DEBUG -- :   Post Update (0.9ms)  UPDATE "posts" SET "text" = $1, "updated_at" = $2 WHERE "posts"."id" = $3  [["text", "https://www.quora.com/What-is-Phoenixs-alternative-for-Rails-devise"], ["updated_at", "2019-08-14 03:43:11.134542"], ["id", 83]]
2019-08-14T03:43:12.656144042Z app[slack.1]: https://www.quora.com/What-is-Phoenixs-alternative-for-Rails-devise is missing attributes, could not create preview
2019-08-14T03:43:12.656250467Z app[slack.1]: https://www.quora.com/What-is-Phoenixs-alternative-for-Rails-devise is missing attributes, could not create preview
2019-08-14T03:43:12.656271819Z app[slack.1]: https://www.quora.com/What-is-Phoenixs-alternative-for-Rails-devise is missing attributes, could not create preview
2019-08-14T03:43:12.658477600Z app[slack.1]: D, [2019-08-14T03:43:12.652145 #8] DEBUG -- :    (1.4ms)  COMMIT
2019-08-14T03:46:36.836281450Z app[slack.1]: D, [2019-08-14T03:43:12.657131 #8] DEBUG -- : [BOT/postwave] {:message=>#<Slack::Messages::Message channel="CL3TXJTLL" client_msg_id="de06f3fa-091f-488d-a735-3563098e157b" event_ts="1565754189.002000" source_team="TL3K7E8CV" suppress_notification=false team="TL3K7E8CV" text="<https://www.quora.com/What-is-Phoenixs-alternative-for-Rails-devise>" ts="1565754189.002000" type="message" user="UL351D6CC" user_team="TL3K7E8CV">}
2019-08-14T03:46:36.836679355Z app[slack.1]: D, [2019-08-14T03:43:12.657510 #8] DEBUG -- : [BOT/postwave] {:on_message=>#<Slack::Messages::Message channel="CL3TXJTLL" client_msg_id="de06f3fa-091f-488d-a735-3563098e157b" event_ts="1565754189.002000" source_team="TL3K7E8CV" suppress_notification=false team="TL3K7E8CV" text="<https://www.quora.com/What-is-Phoenixs-alternative-for-Rails-devise>" ts="1565754189.002000" type="message" user="UL351D6CC" user_team="TL3K7E8CV">, :bot_message=>false}
2019-08-14T03:46:36.837129398Z app[slack.1]: D, [2019-08-14T03:43:12.657762 #8] DEBUG -- : [BOT/postwave] {:on_im=>#<Slack::Messages::Message channel="CL3TXJTLL" client_msg_id="de06f3fa-091f-488d-a735-3563098e157b" event_ts="1565754189.002000" source_team="TL3K7E8CV" suppress_notification=false team="TL3K7E8CV" text="<https://www.quora.com/What-is-Phoenixs-alternative-for-Rails-devise>" ts="1565754189.002000" type="message" user="UL351D6CC" user_team="TL3K7E8CV">, :bot_message=>false, :is_im_channel=>false}
2019-08-14T03:46:36.837155693Z app[slack.1]: New Slack Message: channel=CL3TXJTLL, client_msg_id=de06f3fa-091f-488d-a735-3563098e157b, event_ts=1565754189.002000, source_team=TL3K7E8CV, suppress_notification=false, team=TL3K7E8CV, text=<https://www.quora.com/What-is-Phoenixs-alternative-for-Rails-devise>, ts=1565754189.002000, type=message, user=UL351D6CC, user_team=TL3K7E8CV
2019-08-14T03:46:36.837317031Z app[slack.1]: D, [2019-08-14T03:43:12.664536 #8] DEBUG -- :   Team Load (6.1ms)  SELECT "teams".* FROM "teams" WHERE "teams"."id" = $1 LIMIT $2  [["id", 5], ["LIMIT", 1]]
2019-08-14T03:46:36.837340619Z app[slack.1]: D, [2019-08-14T03:43:12.670642 #8] DEBUG -- :    (3.6ms)  BEGIN
2019-08-14T03:46:36.837457378Z app[slack.1]: D, [2019-08-14T03:43:12.673575 #8] DEBUG -- :   Post Create (2.0ms)  INSERT INTO "posts" ("team_id", "text", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"  [["team_id", 5], ["text", "<https://www.quora.com/What-is-Phoenixs-alternative-for-Rails-devise>"], ["created_at", "2019-08-14 03:43:12.666167"], ["updated_at", "2019-08-14 03:43:12.666167"]]
2019-08-14T03:46:36.837479718Z app[slack.1]: D, [2019-08-14T03:43:12.683010 #8] DEBUG -- :   Post Update (7.0ms)  UPDATE "posts" SET "text" = $1, "updated_at" = $2 WHERE "posts"."id" = $3  [["text", "https://www.quora.com/What-is-Phoenixs-alternative-for-Rails-devise"], ["updated_at", "2019-08-14 03:43:12.674755"], ["id", 84]]
2019-08-14T03:46:36.837582825Z app[slack.1]: https://www.quora.com/What-is-Phoenixs-alternative-for-Rails-devise is missing attributes, could not create preview
2019-08-14T03:46:36.837601546Z app[slack.1]: https://www.quora.com/What-is-Phoenixs-alternative-for-Rails-devise is missing attributes, could not create preview
2019-08-14T03:46:36.837667127Z app[slack.1]: https://www.quora.com/What-is-Phoenixs-alternative-for-Rails-devise is missing attributes, could not create preview
2019-08-14T03:46:36.837814487Z app[slack.1]: D, [2019-08-14T03:43:14.110840 #8] DEBUG -- :    (1.7ms)  COMMIT
2019-08-14T03:46:36.837946942Z app[slack.1]: I, [2019-08-14T03:44:21.776431 #8]  INFO -- : [BOT/postwave] disconnected
2019-08-14T03:46:36.837970444Z app[slack.1]: E, [2019-08-14T03:46:36.834779 #8] ERROR -- : Failed to open TCP connection to slack.com:443 (Connection timed out - connect(2) for "slack.com" port 443) (Faraday::TimeoutError)
2019-08-14T03:46:36.838045944Z app[slack.1]: /app/vendor/ruby-2.5.1/lib/ruby/2.5.0/net/http.rb:939:in `rescue in block in connect'
2019-08-14T03:46:36.838066691Z app[slack.1]: /app/vendor/ruby-2.5.1/lib/ruby/2.5.0/net/http.rb:936:in `block in connect'
2019-08-14T03:46:36.838156227Z app[slack.1]: /app/vendor/ruby-2.5.1/lib/ruby/2.5.0/timeout.rb:93:in `block in timeout'
2019-08-14T03:46:36.838191581Z app[slack.1]: /app/vendor/ruby-2.5.1/lib/ruby/2.5.0/timeout.rb:103:in `timeout'
2019-08-14T03:46:36.838246403Z app[slack.1]: /app/vendor/ruby-2.5.1/lib/ruby/2.5.0/net/http.rb:935:in `connect'
2019-08-14T03:46:36.838279073Z app[slack.1]: /app/vendor/ruby-2.5.1/lib/ruby/2.5.0/net/http.rb:920:in `do_start'
2019-08-14T03:46:36.838329403Z app[slack.1]: /app/vendor/ruby-2.5.1/lib/ruby/2.5.0/net/http.rb:909:in `start'
2019-08-14T03:46:36.838360707Z app[slack.1]: /app/vendor/ruby-2.5.1/lib/ruby/2.5.0/net/http.rb:1455:in `request'
2019-08-14T03:46:36.838436203Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/faraday-0.15.4/lib/faraday/adapter/net_http.rb:87:in `perform_request'
2019-08-14T03:46:36.838473179Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/faraday-0.15.4/lib/faraday/adapter/net_http.rb:43:in `block in call'
2019-08-14T03:46:36.838543076Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/faraday-0.15.4/lib/faraday/adapter/net_http.rb:92:in `with_net_http_connection'
2019-08-14T03:46:36.838561328Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/faraday-0.15.4/lib/faraday/adapter/net_http.rb:38:in `call'
2019-08-14T03:46:36.838627798Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/faraday-0.15.4/lib/faraday/response.rb:8:in `call'
2019-08-14T03:46:36.838646437Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/faraday-0.15.4/lib/faraday/response/logger.rb:26:in `call'
2019-08-14T03:46:36.838860996Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/faraday_middleware-0.13.1/lib/faraday_middleware/response_middleware.rb:31:in `call'
2019-08-14T03:46:36.838914094Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/faraday-0.15.4/lib/faraday/response.rb:8:in `call'
2019-08-14T03:46:36.838964186Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/faraday-0.15.4/lib/faraday/response.rb:8:in `call'
2019-08-14T03:46:36.838994477Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/faraday-0.15.4/lib/faraday/response.rb:8:in `call'
2019-08-14T03:46:36.839047903Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/faraday-0.15.4/lib/faraday/request/url_encoded.rb:15:in `call'
2019-08-14T03:46:36.839080133Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/faraday-0.15.4/lib/faraday/request/multipart.rb:15:in `call'
2019-08-14T03:46:36.839133195Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/faraday-0.15.4/lib/faraday/rack_builder.rb:143:in `build_response'
2019-08-14T03:46:36.839164354Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/faraday-0.15.4/lib/faraday/connection.rb:387:in `run_request'
2019-08-14T03:46:36.839301197Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/faraday-0.15.4/lib/faraday/connection.rb:175:in `post'
2019-08-14T03:46:36.839322060Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-ruby-client-0.14.2/lib/slack/web/faraday/request.rb:25:in `request'
2019-08-14T03:46:36.839431655Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-ruby-client-0.14.2/lib/slack/web/faraday/request.rb:10:in `post'
2019-08-14T03:46:36.839449920Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-ruby-client-0.14.2/lib/slack/web/api/endpoints/rtm.rb:41:in `rtm_start'
2019-08-14T03:46:36.839517214Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-ruby-client-0.14.2/lib/slack/real_time/client.rb:153:in `build_socket'
2019-08-14T03:46:36.839535167Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-ruby-client-0.14.2/lib/slack/real_time/client.rb:58:in `start_async'
2019-08-14T03:46:36.839601287Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-bot-server-0.4.7/lib/slack_bot_server/bot.rb:179:in `start'
2019-08-14T03:46:36.839624221Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-bot-server-0.4.7/lib/slack_bot_server/bot.rb:348:in `block in <class:Bot>'
2019-08-14T03:46:36.839717603Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-bot-server-0.4.7/lib/slack_bot_server/bot.rb:368:in `instance_exec'
2019-08-14T03:46:36.839736303Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-bot-server-0.4.7/lib/slack_bot_server/bot.rb:368:in `block in run_callbacks'
2019-08-14T03:46:36.841382706Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-bot-server-0.4.7/lib/slack_bot_server/bot.rb:367:in `each'
2019-08-14T03:46:36.841442072Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-bot-server-0.4.7/lib/slack_bot_server/bot.rb:367:in `run_callbacks'
2019-08-14T03:46:36.841532035Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-bot-server-0.4.7/lib/slack_bot_server/bot.rb:174:in `block in start'
2019-08-14T03:46:36.841540632Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-ruby-client-0.14.2/lib/slack/real_time/client.rb:203:in `block in callback'
2019-08-14T03:46:36.841546836Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-ruby-client-0.14.2/lib/slack/real_time/client.rb:202:in `each'
2019-08-14T03:46:36.841552625Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-ruby-client-0.14.2/lib/slack/real_time/client.rb:202:in `callback'
2019-08-14T03:46:36.841581804Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-ruby-client-0.14.2/lib/slack/real_time/client.rb:97:in `block (2 levels) in run_loop'
2019-08-14T03:46:36.841681334Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/websocket-driver-0.7.1/lib/websocket/driver/event_emitter.rb:39:in `block in emit'
2019-08-14T03:46:36.841689375Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/websocket-driver-0.7.1/lib/websocket/driver/event_emitter.rb:38:in `each'
2019-08-14T03:46:36.841695148Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/websocket-driver-0.7.1/lib/websocket/driver/event_emitter.rb:38:in `emit'
2019-08-14T03:46:36.841701065Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-ruby-client-0.14.2/lib/slack/real_time/socket.rb:82:in `close'
2019-08-14T03:46:36.841706745Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-ruby-client-0.14.2/lib/slack/real_time/client.rb:141:in `restart_async'
2019-08-14T03:46:36.841712513Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-ruby-client-0.14.2/lib/slack/real_time/client.rb:130:in `run_ping!'
2019-08-14T03:46:36.841766447Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-ruby-client-0.14.2/lib/slack/real_time/concurrency/eventmachine.rb:34:in `block in start_async'
2019-08-14T03:46:36.841773954Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/eventmachine-1.2.7/lib/em/timers.rb:56:in `fire'
2019-08-14T03:46:36.841780005Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:195:in `call'
2019-08-14T03:46:36.841788185Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:195:in `run_machine'
2019-08-14T03:46:36.841794096Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:195:in `run'
2019-08-14T03:46:36.841799920Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-bot-server-0.4.7/lib/slack_bot_server/server.rb:80:in `start'
2019-08-14T03:46:36.841805813Z app[slack.1]: /app/bin/slack_server:36:in `<top (required)>'
2019-08-14T03:46:36.841812187Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
2019-08-14T03:46:36.841818228Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
2019-08-14T03:46:36.841857406Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/railties-6.0.0.rc1/lib/rails/commands/runner/runner_command.rb:42:in `perform'
2019-08-14T03:46:36.841864514Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
2019-08-14T03:46:36.841887895Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
2019-08-14T03:46:36.841894016Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
2019-08-14T03:46:36.841899694Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/railties-6.0.0.rc1/lib/rails/command/base.rb:65:in `perform'
2019-08-14T03:46:36.841919932Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/railties-6.0.0.rc1/lib/rails/command.rb:46:in `invoke'
2019-08-14T03:46:36.841925923Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/railties-6.0.0.rc1/lib/rails/commands.rb:18:in `<top (required)>'
2019-08-14T03:46:36.841932011Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
2019-08-14T03:46:36.841937914Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
2019-08-14T03:46:36.841944000Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
2019-08-14T03:46:36.841949942Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
2019-08-14T03:46:36.841956005Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
2019-08-14T03:46:36.841961909Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/activesupport-6.0.0.rc1/lib/active_support/dependencies.rb:302:in `block in require'
2019-08-14T03:46:36.841967811Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/activesupport-6.0.0.rc1/lib/active_support/dependencies.rb:268:in `load_dependency'
2019-08-14T03:46:36.841976259Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/activesupport-6.0.0.rc1/lib/active_support/dependencies.rb:302:in `require'
2019-08-14T03:46:36.841982143Z app[slack.1]: bin/rails:9:in `<main>'
2019-08-14T03:47:11.070684239Z app[slack.1]: E, [2019-08-14T03:47:10.831162 #8] ERROR -- : undefined method `name' for nil:NilClass (NoMethodError)
2019-08-14T03:47:11.070873580Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-bot-server-0.4.7/lib/slack_bot_server/bot.rb:64:in `bot_user_name'
2019-08-14T03:47:11.070884754Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-bot-server-0.4.7/lib/slack_bot_server/logging.rb:22:in `log_string'
2019-08-14T03:47:11.070889545Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-bot-server-0.4.7/lib/slack_bot_server/logging.rb:3:in `log'
2019-08-14T03:47:11.070893747Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-bot-server-0.4.7/lib/slack_bot_server/bot.rb:172:in `block in start'
2019-08-14T03:47:11.070897963Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-ruby-client-0.14.2/lib/slack/real_time/client.rb:203:in `block in callback'
2019-08-14T03:47:11.070902187Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-ruby-client-0.14.2/lib/slack/real_time/client.rb:202:in `each'
2019-08-14T03:47:11.070906323Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-ruby-client-0.14.2/lib/slack/real_time/client.rb:202:in `callback'
2019-08-14T03:47:11.070910452Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-ruby-client-0.14.2/lib/slack/real_time/client.rb:97:in `block (2 levels) in run_loop'
2019-08-14T03:47:11.070935287Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/websocket-driver-0.7.1/lib/websocket/driver/event_emitter.rb:39:in `block in emit'
2019-08-14T03:47:11.070939574Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/websocket-driver-0.7.1/lib/websocket/driver/event_emitter.rb:38:in `each'
2019-08-14T03:47:11.070943252Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/websocket-driver-0.7.1/lib/websocket/driver/event_emitter.rb:38:in `emit'
2019-08-14T03:47:11.070946937Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-ruby-client-0.14.2/lib/slack/real_time/socket.rb:82:in `close'
2019-08-14T03:47:11.070950696Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-ruby-client-0.14.2/lib/slack/real_time/client.rb:141:in `restart_async'
2019-08-14T03:47:11.070954352Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-ruby-client-0.14.2/lib/slack/real_time/client.rb:130:in `run_ping!'
2019-08-14T03:47:11.070959689Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-ruby-client-0.14.2/lib/slack/real_time/concurrency/eventmachine.rb:34:in `block in start_async'
2019-08-14T03:47:11.070965377Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/eventmachine-1.2.7/lib/em/timers.rb:56:in `fire'
2019-08-14T03:47:11.070970876Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:195:in `call'
2019-08-14T03:47:11.070978499Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:195:in `run_machine'
2019-08-14T03:47:11.070984712Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:195:in `run'
2019-08-14T03:47:11.070990380Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-bot-server-0.4.7/lib/slack_bot_server/server.rb:80:in `start'
2019-08-14T03:47:11.070995483Z app[slack.1]: /app/bin/slack_server:36:in `<top (required)>'
2019-08-14T03:47:11.071003508Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
2019-08-14T03:47:11.071007318Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
2019-08-14T03:47:11.071011524Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/railties-6.0.0.rc1/lib/rails/commands/runner/runner_command.rb:42:in `perform'
2019-08-14T03:47:11.071015190Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
2019-08-14T03:47:11.071018897Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
2019-08-14T03:47:11.071022481Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
2019-08-14T03:47:11.071026139Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/railties-6.0.0.rc1/lib/rails/command/base.rb:65:in `perform'
2019-08-14T03:47:11.071029729Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/railties-6.0.0.rc1/lib/rails/command.rb:46:in `invoke'
2019-08-14T03:47:11.071033337Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/railties-6.0.0.rc1/lib/rails/commands.rb:18:in `<top (required)>'
2019-08-14T03:47:11.071037197Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
2019-08-14T03:47:11.071041084Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
2019-08-14T03:47:11.071050703Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
2019-08-14T03:47:11.071054552Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
2019-08-14T03:47:11.071058218Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
2019-08-14T03:47:11.071061888Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/activesupport-6.0.0.rc1/lib/active_support/dependencies.rb:302:in `block in require'
2019-08-14T03:47:11.071065535Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/activesupport-6.0.0.rc1/lib/active_support/dependencies.rb:268:in `load_dependency'
2019-08-14T03:47:11.071069696Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/activesupport-6.0.0.rc1/lib/active_support/dependencies.rb:302:in `require'
2019-08-14T03:47:11.071073418Z app[slack.1]: bin/rails:9:in `<main>'
2019-08-14T03:47:11.071077029Z app[slack.1]: E, [2019-08-14T03:47:11.069553 #8] ERROR -- : undefined method `name' for nil:NilClass (NoMethodError)
2019-08-14T03:47:11.071080700Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-bot-server-0.4.7/lib/slack_bot_server/bot.rb:74:in `team_name'
2019-08-14T03:47:11.071084408Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-bot-server-0.4.7/lib/slack_bot_server/bot.rb:157:in `block in start'
2019-08-14T03:47:11.071088001Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-ruby-client-0.14.2/lib/slack/real_time/client.rb:203:in `block in callback'
2019-08-14T03:47:11.071091758Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-ruby-client-0.14.2/lib/slack/real_time/client.rb:202:in `each'
2019-08-14T03:47:11.071095371Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-ruby-client-0.14.2/lib/slack/real_time/client.rb:202:in `callback'
2019-08-14T03:47:11.071099007Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-ruby-client-0.14.2/lib/slack/real_time/client.rb:87:in `block (2 levels) in run_loop'
2019-08-14T03:47:11.071102743Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/websocket-driver-0.7.1/lib/websocket/driver/event_emitter.rb:39:in `block in emit'
2019-08-14T03:47:11.071106391Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/websocket-driver-0.7.1/lib/websocket/driver/event_emitter.rb:38:in `each'
2019-08-14T03:47:11.071110075Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/websocket-driver-0.7.1/lib/websocket/driver/event_emitter.rb:38:in `emit'
2019-08-14T03:47:11.071113783Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/faye-websocket-0.10.9/lib/faye/websocket/api/event_target.rb:44:in `dispatch_event'
2019-08-14T03:47:11.071117437Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/faye-websocket-0.10.9/lib/faye/websocket/api.rb:106:in `open'
2019-08-14T03:47:11.071121012Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/faye-websocket-0.10.9/lib/faye/websocket/api.rb:44:in `block in initialize'
2019-08-14T03:47:11.071124641Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/websocket-driver-0.7.1/lib/websocket/driver/event_emitter.rb:39:in `block in emit'
2019-08-14T03:47:11.071128408Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/websocket-driver-0.7.1/lib/websocket/driver/event_emitter.rb:38:in `each'
2019-08-14T03:47:11.071135915Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/websocket-driver-0.7.1/lib/websocket/driver/event_emitter.rb:38:in `emit'
2019-08-14T03:47:11.071140042Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/websocket-driver-0.7.1/lib/websocket/driver.rb:168:in `open'
2019-08-14T03:47:11.071144711Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/websocket-driver-0.7.1/lib/websocket/driver/client.rb:72:in `parse'
2019-08-14T03:47:11.071148403Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/faye-websocket-0.10.9/lib/faye/websocket/api.rb:157:in `parse'
2019-08-14T03:47:11.071152074Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-ruby-client-0.14.2/lib/slack/real_time/concurrency/eventmachine.rb:19:in `parse'
2019-08-14T03:47:11.071155749Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/faye-websocket-0.10.9/lib/faye/websocket/client.rb:82:in `receive_data'
2019-08-14T03:47:11.071159380Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:195:in `run_machine'
2019-08-14T03:47:11.071185750Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:195:in `run'
2019-08-14T03:47:11.071191387Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/slack-bot-server-0.4.7/lib/slack_bot_server/server.rb:80:in `start'
2019-08-14T03:47:11.071196995Z app[slack.1]: /app/bin/slack_server:36:in `<top (required)>'
2019-08-14T03:47:11.071202841Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
2019-08-14T03:47:11.071208271Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
2019-08-14T03:47:11.071213737Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/railties-6.0.0.rc1/lib/rails/commands/runner/runner_command.rb:42:in `perform'
2019-08-14T03:47:11.071217566Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
2019-08-14T03:47:11.071221248Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
2019-08-14T03:47:11.071224844Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
2019-08-14T03:47:11.071228541Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/railties-6.0.0.rc1/lib/rails/command/base.rb:65:in `perform'
2019-08-14T03:47:11.071232149Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/railties-6.0.0.rc1/lib/rails/command.rb:46:in `invoke'
2019-08-14T03:47:11.071235845Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/railties-6.0.0.rc1/lib/rails/commands.rb:18:in `<top (required)>'
2019-08-14T03:47:11.071239510Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
2019-08-14T03:47:11.071243377Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
2019-08-14T03:47:11.071247203Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
2019-08-14T03:47:11.071252054Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
2019-08-14T03:47:11.071257513Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
2019-08-14T03:47:11.071269088Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/activesupport-6.0.0.rc1/lib/active_support/dependencies.rb:302:in `block in require'
2019-08-14T03:47:11.071274726Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/activesupport-6.0.0.rc1/lib/active_support/dependencies.rb:268:in `load_dependency'
2019-08-14T03:47:11.071278513Z app[slack.1]: /app/vendor/bundle/ruby/2.5.0/gems/activesupport-6.0.0.rc1/lib/active_support/dependencies.rb:302:in `require'
2019-08-14T03:47:11.071282187Z app[slack.1]: bin/rails:9:in `<main>'

Full bundle:

Using rake 12.3.2
Using concurrent-ruby 1.1.5
Using i18n 1.6.0
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using zeitwerk 2.1.8
Using activesupport 6.0.0.rc1
Using builder 3.2.3
Using erubi 1.8.0
Using mini_portile2 2.4.0
Using nokogiri 1.10.3
Using rails-dom-testing 2.0.3
Using crass 1.0.4
Using loofah 2.2.3
Using rails-html-sanitizer 1.0.4
Using actionview 6.0.0.rc1
Using rack 2.0.7
Using rack-test 1.1.0
Using actionpack 6.0.0.rc1
Using nio4r 2.4.0
Using websocket-extensions 0.1.4
Using websocket-driver 0.7.1
Using actioncable 6.0.0.rc1
Using globalid 0.4.2
Using activejob 6.0.0.rc1
Using activemodel 6.0.0.rc1
Using activerecord 6.0.0.rc1
Using mimemagic 0.3.3
Using marcel 0.3.3
Using activestorage 6.0.0.rc1
Using mini_mime 1.0.2
Using mail 2.7.1
Using actionmailbox 6.0.0.rc1
Using actionmailer 6.0.0.rc1
Using actiontext 6.0.0.rc1
Using public_suffix 3.1.1
Using addressable 2.6.0
Using ansi 1.5.0
Using ast 2.4.0
Using bcrypt 3.1.13
Using msgpack 1.3.0
Using bootsnap 1.4.4
Using environs 1.1.0
Using multipart-post 2.1.1
Using faraday 0.15.4
Using faraday_middleware 0.13.1
Using hashie 3.6.0
Using multi_json 1.13.1
Using yajl-ruby 1.4.1
Using buffer 0.1.3 from https://github.com/bufferapp/buffer-ruby.git (at master@eb88e48)
Using bundler 2.0.1
Using orm_adapter 0.5.0
Using method_source 0.9.2
Using thor 0.20.3
Using railties 6.0.0.rc1
Using responders 3.0.0
Using warden 1.2.8
Using devise 4.6.2
Using devise_invitable 2.0.1
Using erubis 2.7.0
Using eventmachine 1.2.7
Using faye-websocket 0.10.9
Using gli 2.18.1
Using temple 0.8.1
Using tilt 2.0.9
Using haml 5.1.1
Using sexp_processor 4.12.1
Using ruby_parser 3.13.1
Using html2haml 2.2.0
Using haml-rails 2.0.1
Using jbuilder 2.9.1
Using jwt 2.2.1
Using multi_xml 0.6.0
Using oauth2 1.4.1
Using ruby-ll 2.1.2
Using oga 2.15
Using ogp 0.3.0
Using omniauth 1.9.0
Using omniauth-oauth2 1.6.0
Using omniauth-buffer2 0.0.1
Using pg 1.1.4
Using puma 3.12.1
Using rack-proxy 0.6.5
Using sprockets 3.7.2
Using sprockets-rails 3.2.1
Using rails 6.0.0.rc1
Using redis 4.1.2
Using slack-ruby-client 0.14.2
Using slack-bot-server 0.4.7
Using turbolinks-source 5.2.0
Using turbolinks 5.2.0
Using webpacker 4.0.7

Extend docs to explain how to use an Add to Slack button with slack-bot-server

The docs have a brief passage re: creating a Slack App, but it doesn't provide hints on what needs to be added to our applications to get an Add to Slack button to work. The docs of slack-bot-server don't seem to explain from where we're supposed to get team tokens.

Presumably we'd need an endpoint in our greater application where the auth code can be posted and then use a Slack::Web::Client#oauth_access to get the token.

(BTW, slack-ruby-bot-server has this built-in … but it's dependencies on Mongo make it a non-starter – I know they're trying to abstract that out though)

Error w/ slack-api gem's faye-websocket dependency

I got this gemfile conflict:

slack-bot-server (>= 0) ruby depends on
    slack-api (>= 1.1) ruby depends on
        faye-websocket (~> 0.9.2) ruby

slack-ruby-client (>= 0) ruby depends on
    faye-websocket (0.10.1)

I forked the slack-ruby gem at https://github.com/LucasCioffi/slack-ruby-gem/blob/dev/slack.gemspec and changed the faye dependency:

"faye-websocket", ">= 0.9.2"

I tried including this fork of the slack-ruby gem into my fork of slack-bot-server at https://github.com/LucasCioffi/slack-bot-server/blob/master/slack_bot_server.gemspec but this format didn't work for specifying the git source:

spec.add_dependency "slack-api", :git => "https://github.com/LucasCioffi/slack-ruby-gem"

...so then I commented it out and manually included the files in this order in my gemfile:

gem "slack-api", :git => "https://github.com/LucasCioffi/slack-ruby-gem"
gem 'slack-bot-server', :git => 'https://github.com/LucasCioffi/slack-bot-server'

The error is gone, but this is a suboptimal solution. Anything else that can be done?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.