Giter Site home page Giter Site logo

energon-a-secas / enerbot-slack-bot Goto Github PK

View Code? Open in Web Editor NEW
13.0 6.0 6.0 1.2 MB

Energon's Slack Slave

Home Page: https://cloud.ehq.cl

License: MIT License

Ruby 98.02% Makefile 1.56% Dockerfile 0.41%
ruby bot magic energon cube machine-learning digital-transformation

enerbot-slack-bot's Introduction

ENERBOT (Slack Slave)

This software is Blessed Codacy Badge

Based on the bototo3000, a strong independent bot that is written on Ruby and only uses the Slack Ruby Client to look cooler. Is design for small talks and AGILE teams.

He likes cubes.

Development

Main functionalities:

  • enerbot: the bot.
  • enersay: be surprise by the miracle of Machile Learning.
  • enershut: we build this feature because sometimes it gains consiousness and very often even learns to love.

Getting started

Prerequisites

A computer.

  • Install Ruby.
  • Install Ruby Version Management. RVM lets you easily work with multiple versions of Ruby.
  • Install Bundler to get all dependencies or you could stay in the dependency abyss by installing each dependency manually. It's your choice.

We highly recommend you to use the Ruby 2.5.1 version because it works on our machines. You can check your current version with:

ruby --version

Setting a new version with RVM its just executing:

rvm install 2.5.1
rvm use 2.5.1

Installing

Download the repository.

git clone https://github.com/energon-a-secas/enerbot-slack.git

To get all dependencies of the enerbot execute use bundle install inside of the repository.

Optional step

You can take all the magic of ENERGON to your current Slack space by importing our beloved crafted custom emojis, and be the coolest kid in the hood. Please, refer to Add custom emoji.

Configuring

You need to export the following parameters as environment variables:

  • SLACK_API_TOKEN: it lets you connect the bot with de Slack space.
  • SLACK_LOG_CHANNEL: this will be the channel where all your confidential (or mostly boring) logs ends up.
  • SLACK_USERS: list of users that can access to features like 'enershut' or 'enersay'
  • SLACK_CHANNELS: list of authorized channels where your bot can be consulted.
  • SLACK_ICON: set a custom image for the bot.
  • SLACK_NAME: set a custom name fot the bot.

Running the Enerbot

Do this:

ruby client.rb

Docker

Run Enerbot inside of a container just to be popular.

docker build -t enerbot .
docker run -e SLACK_API="YOUR-TOKEN-XX-XX-XXX" -e SLACK_ADMINS="XXXXXX" -e SLACK_CHANNELS="XXXXXX" -e SLACK_LOG_CHANNEL="XXXXXX" --name="enerbot" enerbot

Alternative you can just put your credentials on the makefile and the run make deploy

Docker Compose

In this scenario docker-compose will provide the variables to the container using the .env file. It should look something like this:

SLACK_API_TOKEN=xoxb-123123-asedereje-persona
SLACK_NAME=COMPOSE-ENERBOT
SLACK_ICON=
SLACK_USERS=
SLACK_CHANNELS=
SLACK_LOG_BOT=

To build the image, you need to run:

docker-compose build enerbot

At Energon, we highly recommend to run without the detach mode for debug purposes.

docker-compose up enerbot

But if you instead run the container with the detach mode, you can use docker-compose logs -f -t enerbot to get the logs from the container.

Contributing ❤️

If you have any doubts or you want to see a new feature, please feel free to contact us by open an issue.

License

See the LICENSE file for license rights and limitations (MIT).

enerbot-slack-bot's People

Contributors

agarat avatar dependabot[bot] avatar energonrocks avatar fardx avatar jlueiza avatar laltamir avatar lucianoadonis avatar yamilmedina avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

enerbot-slack-bot's Issues

Add blockchain backend to Enerbot

For future releases of this bot, we (i) need a backend, the proposal for this it would be something like this:

  • Create a database with privileged users of this community.
  • Store useful information and some related to events.
  • Provision a proper way to keep a registry of credentials like channels or admins instead of using env variables.

Kind regards.

Post Scriptum: You can use and backend like:

  • Firebase Database
  • Mysql (please no)
  • PostgreSQL
  • Whatever your heart feels right.

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.