Skip to content

ht68rohit/slack

 
 

Repository files navigation

Slack as a microservice

Open Microservice Guide

This microservice's goal is to fully utilise the Slack API.

OMG CLI

Slack Bot

omg exec -e TOKEN=<secret> -c bot

Subscribe to an event.

omg subscribe bot hears -a "pattern=/^hello/"

Asyncy Example

The slack service is published in the Asyncy Hub

slack bot as client
    when client hears channel:'general' pattern:/^welcome/ as msg
        msg emoji key:'thumbs_up'
        msg reply message:'Nice to have you here'

    when client responds pattern:/foo/ as msg
        # respond to direct messages
        msg reply message:'bar'

    when client slash pattern:/deploy/ as msg
        # when user does /deploy do something awesome

# send a post
slack send text:'Hello world!' to:'general'

About

Slack bot microservice

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 98.0%
  • Dockerfile 2.0%