Skip to content

devcongress/slackbot

develop
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
December 15, 2018 19:19
December 15, 2018 19:19
November 6, 2016 10:48
August 3, 2016 23:56
October 30, 2016 13:22
November 5, 2016 07:20
November 8, 2016 20:12
April 17, 2017 20:54
December 14, 2018 12:30
February 9, 2019 00:40
February 8, 2019 23:56
February 8, 2019 23:18
February 9, 2019 00:40
March 26, 2021 09:28
March 26, 2021 09:28

Slackbot

Introduction

A simple slackbot for the DevCongress slack, which does tasks including:

  • welcome new members
  • greet in the morning and night
  • forex exchange to GH¢ e.g. @botname convert 20 euros or @botname convert $30
  • forex exchange from one currency to another e.g. @botname convert 20 eur to gbp
  • Define common English words e.g. @botname define fire or @botname What is the meaning of marketing
  • Get jobs from the DevCongress Jobs Board e.g. (DM the bot) React jobs or Jobs for UI designers or Node and Rails jobs

Teaching the bot new tricks

  • Read the Contribution Guide.
  • Open your terminal and run npm run generate, follow the prompts to scaffold the required files.
  • Replace the scaffolded code with your own
  • Submit a PR

Find relevant documentation at Botkit and Slack API

Installation

Clone the repository

git clone https://github.com/devcongress/slackbot

Go to your terminal and navigate to the directory you cloned the code to and run

npm install

Run the Bot:

Get a Bot token from Slack:

http://my.slack.com/services/new/bot

Rename example.env to .env and update the environment variables in the file.

Run your bot from the command line:

node index.js

The bot is written with botkit which you can learn more about it here http://howdy.ai/botkit

License

This project is licensed under the MIT license.