Git Product home page Git Product logo

slack-connect-4-bot's Introduction

Slack Connect 4 Bot

Start a game in any channel or private group and play with a friend.

Written for fun and to practice new features found in the new ECMAScript 6 JavaScript standard.

Inspired by @CharlieHess/slack-poker-bot.

Getting started

  1. Create a new bot integration here
  2. Run the bot locally or have it running on a heroku server
  3. Start a game using: @<bot-name>: start
  4. Follow the instructions the bot gives you in Slack
  5. Type quit to abandon a game

Running locally

$ git clone [email protected]:wgpsutherland/slack-connect-4-bot.git && cd slack-connect-4-bot
$ npm install
$ npm start

Create token.txt in the root directory and paste in the API token given when creating your bot integration.

Deploying to Heroku

$ heroku create
$ heroku config:set SLACK_CONNECT_4_BOT_TOKEN=[Your API token]
$ git push heroku master

Alternatively, you can deploy your own copy with one click using this button:

Deploy

See the Heroku documentation for more info about changing the configuration variables after deployment.

If you are using the free version of Heroku, the bot will turn itself off after a while and will not respond to any commands on Slack. You can see if this has happened by the circle next to the bot's name in Slack being empty and grey, instead of green. Simply navigate in your browser to heroku-bot-name.herokuapp.com, and the bot will come online again.

Test

Tests can be run using npm test.

Festivities

Start a game using: @<bot-name>: start boo or @<bot-name>: start xmas to play Connect 4 with a festive spin.

slack-connect-4-bot's People

Contributors

descent098 avatar j- avatar joshfarrant avatar matiassingers avatar wgpsutherland 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.