Skip to content

Repository files navigation

Slack Translator

This repo contains everything you need to get started building a translator bot for Slack with Botkit. Botkit is designed to ease the process of designing and running useful, creative bots that live inside messaging platforms. Bots are applications that can send and receive messages, and in many cases, appear alongside their human counterparts as users.

Some bots talk like people, others silently work in the background, while others present interfaces much like modern mobile applications. Botkit gives developers the necessary tools for building bots of any kind! It provides an easy-to-understand interface for sending and receiving messages so that developers can focus on creating novel applications and experiences instead of dealing with API endpoints.

Getting Started

Install Slack Translator

Clone this repository using Git:

git clone https://github.com/siquylee/slack-translator.git

Install dependencies, including Botkit:

cd slack-translator
npm install

Set up your Slack Application

Once you have setup your Slack Translator development enviroment, the next thing you will want to do is set up a new Slack application via the Slack developer portal. This is a multi-step process, but only takes a few minutes.

Update the .env file with your newly acquired tokens. The content of .env file is:

clientId=<YOUR-VALUE>
clientSecret=<YOUR-VALUE>
clientSigningSecret=<YOUR-VALUE>

PORT=3000
DB_PATH=/.data/athena.db
LOCALE_PATH=/app/locales/locale.json
GA_TRACK_ID=
  • GA_TRACK_ID is optional in case you want to integrate with Google Analytics. GA_TRACK_ID expects at least your Google Analytics account ID like UA-XXXX-XX
  • LOCALE_PATH is the absolute path to locale.json file

Launch your bot application by typing:

node .

Now, visit your new bot's login page: http://localhost:3000/login

Extend Slack Translator

Botkit is designed to provide developers a robust starting point for building a custom bot. Included in the code are a set of sample bot "skills" that illustrate various aspects of the Botkit SDK features. Developers will build custom features as modules that live in the skills/ folder. The main bot application will automatically include any files placed there.

A skill module should be in the format:

module.exports = function(controller) {

    // add event handlers to controller
    // such as hears handlers that match triggers defined in code
    // or controller.studio.before, validate, and after which tie into triggers
    // defined in the Botkit Studio UI.

}

Customize Storage

By default,Slack Translator uses a use a SQLite3 database system to record information about the teams and users that interact with the bot. There are Botkit plugins for all the major database systems which can be enabled with just a few lines of code.

About Botkit

Botkit is a product of Howdy and made in Austin, TX with the help of a worldwide community of botheads.

About

Slack Translator - A language assistant for Slack

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages