GithubHelp home page GithubHelp logo

padel-bot's Introduction

Padel Slack bot

This Slack bot helps people organize various events like padel games.

Tech stack

BotKit - listens to Slack requests and answers them

Sqlite - stores event details

Localtunnel - exposes the server to the internet if you're behind a NAT

Installing

Fork and clone the repo

Run npm install to install the dependencies

Download localtunnel npm install -g localtunnel and execute it like this lt --port 8765 --subdomain cwbcn . Be aware that it can be unreliable, needing to be restarted frequently.

Go to the slack api page (https://api.slack.com/apps) and create a new app.

In the Slack slash command settings, in the Command, create your command (e.g. /botname), in Request URL use https://cwbcn.localtunnel.me/slack/receive. Under OAuth and Permissions, be sure to add the redirect URL, which will be https://cwbcn.localtunnel.me/oauth.

In your app, add a .env file with: CLIENT_ID=, CLIENT_SECRET, PORT=8675, VERIFICATION_TOKEN= and BOT_NAME=

Go to the Slack admin panel's App Credentials and use the information to start the application like this : CLIENT_ID=<client id> CLIENT_SECRET=<client secret> VERIFICATION_TOKEN=<verification token> PORT=8765 npm run dev

Authenticate the application with Oauth by going to (http://localhost:8765/login)

Use

Type /botname create 13:00 tomorrow to create a new event

Type /botname next to see the next event

If more than one person is working on the project, each team member has to create a separate slack app and run localtunnel under a different subdomanin. E.g.cwbcn2.

Contributing

  • fix the tests by mocking the database data

  • replace the file store database on which this BotKit implementation relies by a table in the app's SQlite database.

  • implement a database persistance for the attendance tracking

  • add button to unregister from an event

  • list upcoming events and sort them by date, with their corresponding attendance

  • add configurable event reminders

  • add the events to people's Google/Outlook calendars once they register

  • manage payments among participants (enter total amount, split by number of participants, send paypal link as DM)

  • decouple the localtunnel command line app from the bot on development

Made with love in Codeworks

padel-bot's People

Contributors

jmporchet avatar annacollins85 avatar isabellachen avatar

Watchers

James Cloos 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.