heaptracetechnology / slack

Slack bot microservice

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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


Languages

Language:Python 97.3%Language:Dockerfile 2.7%