GithubHelp home page GithubHelp logo

ebot's Introduction

ebot

A modular bot for the Slack chat platform

About

Ebot is a Slack chat bot that can be extended via modules uploaded as code snippets. You can message Ebot directly (or via a channel that it is joined to) with a code snippet and ask it to "assimilate" that snippet, adding it permanently to it's modules.

Once a module is assimilated by Ebot you can call that code from Slack with the following format:

@ebot [module_name] [optional: func] [optional: arg1, arg2, arg3...]

If you don't add function and args, Ebot assumes to run module_name:run/0.

For instance if you uploaded the following snippet:

-module(my_test_command).

-export([test_fun/1]).

test_fun(String) ->
    "I got your string: " ++ String.

And then asked Ebot to assimilate it:

@ebot assimilate

You would get a response like this:

code assimilated: ebot_slack_module_my_test_command

From then on you can run that module as an Ebot command:

me: @ebot my_test_command test_fun Hello!
ebot: I got your string: Hello!

From here the sky is the limit. Upload your own modules to create help files, to commit all loaded modules to git repositories, to allow ebot to replicate itself and start up other bots in the same Erlang VM. The point of ebot is to provide a framework for you to build your Slack bot to suit your needs.

Ebot currently provides no form of security you will need to implement that yourself.

Requirements

  • Linux
  • Erlang/OTP 18+

Configuration is currenty done via sys.config:

[
    {ebot, [
        {bots, [
            #{name => "ebot"}
        ]}
    ]}
].

Config maps can have the following fields:

  • name - string() - (Required) the name that will identify the bot. The bot will be registered to 'ebot_slack_server_' + Name.
  • token - string() - a Slack API token generated via the integration pages.
  • modules - string() - the directory that modules are going to be stored in (defaults to "/var/lib/ebot/default/modules")

token and modules can be provided via ENV variables instead:

export EBOT_SLACK_TOKEN="myslacktoken"
export EBOT_MODULES_DIR="/path/to/modules"

ebot's People

Contributors

shaneutt avatar

Stargazers

Martin Keegan avatar David.Gao avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.