All Projects → spy16 → skit

spy16 / skit

Licence: MIT license
Build slack bots quickly and easily!

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to skit

Intelligo
🤖 Chatbot Framework for Node.js.
Stars: ✭ 347 (+671.11%)
Mutual labels:  bot-framework, slack-bot
Jbot
Make Slack and Facebook Bots in Java.
Stars: ✭ 1,148 (+2451.11%)
Mutual labels:  bot-framework, slack-bot
socrates
Socrates is a microframework for building stateful conversational interfaces for Slack in Ruby.
Stars: ✭ 16 (-64.44%)
Mutual labels:  bot-framework, slack-bot
Slack Machine
A sexy, simple, yet powerful and extendable Slack bot
Stars: ✭ 91 (+102.22%)
Mutual labels:  bot-framework, slack-bot
Go Sarah
Simple yet customizable bot framework written in Go.
Stars: ✭ 188 (+317.78%)
Mutual labels:  bot-framework, slack-bot
botlin
Bot framework built with Kotlin
Stars: ✭ 20 (-55.56%)
Mutual labels:  bot-framework, slack-bot
Slacker
Slack Bot Framework
Stars: ✭ 495 (+1000%)
Mutual labels:  bot-framework, slack-bot
Slack Block Builder
Lightweight, no-dependency JavaScript library for creating Slack Block Kit UIs, with a builder syntax, inspired by SwiftUI.
Stars: ✭ 129 (+186.67%)
Mutual labels:  bot-framework, slack-bot
Slick
Slick, a Slack bot in Go
Stars: ✭ 150 (+233.33%)
Mutual labels:  bot-framework, slack-bot
Urban Bot
🤖 The universal chatbot library based on React. Write once, launch Telegram, Facebook, Slack, ... every messenger with chatbots
Stars: ✭ 223 (+395.56%)
Mutual labels:  bot-framework, slack-bot
Awesome Bots
The most awesome list about bots ⭐️🤖
Stars: ✭ 2,864 (+6264.44%)
Mutual labels:  bot-framework, slack-bot
BotBuilder.Standard
An unofficial CoreCLR targeted .NET Standard ported version of BotBuilder.
Stars: ✭ 22 (-51.11%)
Mutual labels:  bot-framework
botframework-components
The repository for components built by Microsoft for the Azure Bot Framework.
Stars: ✭ 90 (+100%)
Mutual labels:  bot-framework
slackbot-destroyer
📣 ❌ Slack integration that can destroy all incoming messages from Slackbot.
Stars: ✭ 33 (-26.67%)
Mutual labels:  slack-bot
semantic-release-slack-bot
📦 🚀 A slack bot for semantic-release notifying release statuses
Stars: ✭ 92 (+104.44%)
Mutual labels:  slack-bot
nextcord
A Python wrapper for the Discord API forked from discord.py
Stars: ✭ 956 (+2024.44%)
Mutual labels:  bot-framework
flixctl
A toolkit for controlling the infrastructure necessary for a true MaSaS (Movies and Shows as a Service) architecture.
Stars: ✭ 43 (-4.44%)
Mutual labels:  slack-bot
msbotbuilder-go
Microsoft Bot Framework SDK for Go
Stars: ✭ 113 (+151.11%)
Mutual labels:  bot-framework
lockbot
🔒 Coordinate use of your team's shared resources, in Slack 🤝
Stars: ✭ 47 (+4.44%)
Mutual labels:  slack-bot
Wisty.js
🧚‍♀️ Chatbot library turning conversations into actions, locally, in the browser.
Stars: ✭ 24 (-46.67%)
Mutual labels:  bot-framework

skit

GoDoc Build Status Go Report Card

Skit is a simple tool/library written in Go (or Golang) for building Slack bots. Skit pre-compiled binary is good enough to build simple slack bots. For more complex usecases skit can be used as a library as well.

Installation

Simply download the pre-built binary for your platform from the Releases section.

Usage

Pre-compiled Binary

Release archive will contain a skit.toml file with some sample handlers setup. To run this default setup:

  1. Create a bot on slack by following Documentation
  2. Set slack token generated for the bot in skit.toml
  3. Run skit -c skit.toml
  4. Go to slack and find the bot which you created and chat!

skit.toml configuration file

Following skit.toml file can be used to setup a simple slack bot that passes any message sent to it to a shell script bot.sh. The output of this script will be sent back as the response.

token = "your-token-here"
log_level = "info"

[[handlers]]
name = "matcha_all"
type = "command"
match = [
  ".*"
]
cmd = "./bot.sh"
args = [
  "{{ .event.Text }}"
]

See examples/ for samples of different handler configurations.

As a library

Following sample shows how to build a simple bot that echo's everything you say to it!

sk:= skit.New("your-token", logrus.New())
sk.Register("echo_all", skit.SimpleHandler("{{.event.Text}}",  ".*"))
sk.Listen(context.Background())

Handlers

A handler is an implementation of skit.Handler interface. A handler is responsible for consuming event, processing and responding to it when applicable. Currently 3 types of handlers are available.

1. simple

  • simple handler can be used to build simple regex based conversational bot.

  • Following sample shows how to configure simple handler:

    [[handlers]]
    name = "simple_bot"
    type = "simple"
    match = [
      "my name is (?P<name>.*)"
    ]
    message = "Hello there {{ .name }}!"

2. command

  • command handler can be used to delegate the message handling responsibility to external command

  • This allows building bots which are more complex than the ones built with simple

  • Following sample shows how to configure command handler:

    [[handlers]]
    name = "external_command"
    type = "command"
    match = [
      ".*"
    ]
    cmd = "./hello.sh"
    args = [
      "{{ .event.Text }}"
    ]
    timeout = "5s"

3. lua

  • lua allows writing handlers using Lua script which will be executed using embedded Gopher-Lua

  • Lua code will have access to skit instance and its APIs and can be used build complex bots.

  • You can provide paths to be added to LUA_PATH as paths in the following config.

  • In the config sample below, source can be any valid lua code. So you can put your handler code in a file (e.g., handler.lua) under one of the paths and use source="require('handler')" in the handler config.

  • Following sample shows how to configure lua handler:

    [[handlers]]
    name = "lua_handler"
    type = "lua"
    handler = "handle_event"
    paths = []
    source = """
      function handle_event(ctx, sk, event)
        sk:SendText(ctx, "Hello from Lua!", event.Channel)
        return true
      end
    """
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].