slack-ruby-bot icon indicating copy to clipboard operation
slack-ruby-bot copied to clipboard

How to invoke command from Sinatra?

Open cahofmeyr opened this issue 7 years ago • 2 comments

I am using Sinatra and Heroku to run my bot in production.

Is there a way to invoke a bot command from a Sinatra action?

I have another service that makes an HTTP call to the Sinatra app, that I'd like to have invoke a bot command.

cahofmeyr avatar May 31 '18 00:05 cahofmeyr

Nothing built out of the box to do that. Most assumptions are around the fact that the bot receives a well formed slack message via an RTM api. For slash commands or interactive buttons you roll out something like this.

Open to having additions to the framework that make it easier.

dblock avatar May 31 '18 02:05 dblock

This would actually be great for implementing a "ping" endpoint when running in places like Kubernetes. Some way to know if the bot connection to Slack dies so that Kubes can restart would be great.

emachnic avatar Dec 05 '18 17:12 emachnic