Slack Bot Construction Kit 🤖

Summary: it’s a Slack Bot integration construction kit.

This is meant to provide a foundation to build a rich(er!) bot that can integrate with your Discourse and allow you to write simple Ruby to control your bot.

It is somewhat experimental at this stage!

If you want me to help you write a rich bot for a specific purpose, you can hire me, otherwise fork and have a go!

NB There is an official tool for basic integration with Slack chat: Chatroom Integration Plugin (discourse-chat-integration). If you needs are met by this plugin, use it, it is officially supported by the core team. The focus of this plugin is meant to provide a platform for building a bespoke bot.

:link: GitHub: GitHub - merefield/discourse-slack-bot: Get your Discourse to run a bot on Slack and use it to integrate the two systems https://github.com/merefield/discourse-slack-bot
:arrow_right: Install: Follow the plugin installation guide.

Features

Similar, if less developed, than my Discord Bot, it provides some out-of-the-box functionality.

At present this is limited to:

  • chat sync - copies chat from Slack to a Topic in Discourse
  • a command to copy chat history to Discourse (@botname copyhist <number of messages>)

Configuration

Settings are straight forward:

You also need to set up Open ID Connect to work with Slack:

Please NB:

  • This uses simpler to set up Slack Classic Bot (permissions are really simple)

TODO

Curently it only supports Classic Slack Bots. The reason for this is that it leverages existing Gem API libraries that only fully support Classic Bots at this stage in the way needed to integrate with Discourse. Migration to the newer style of bots will require significant work on the Gem API which was not a focus of this MVP. At some far out date in the future, classic bots will be retired. Hopefully we’ll get around to work on the API ahead of that time, especially if there is interest.

Credits:

Discourse team provided funding for this MVP, thank you! :pray: @erlend_sh , @markvanlan @david

9 Likes