Giter VIP home page Giter VIP logo

lunchbot's Introduction


Lunchbot logo

Lunchbot

Set your status at lunch on Slack and see who's away

About

Lunchbot give you a set of commands to manage your status on Slack, and see who's currently away from their desk.

(back to top)

Commands

/lunch

Sets yourself at lunch.

Usage: /lunch [<length> {hours | minutes}]

Examples
/lunch - sets yourself at lunch indefinitely
/lunch 1 hour - you can also use hours, hrs, hr, or h
/lunch 30 minutes - you can also use minute, mins, min, or m

/brb

Sets yourself as away temporarily.

Usage: /lunch

/back OR /bk

Sets yourself as back, removes any status.

Usage: /back

/here

Shows who's currently set as on lunch or away.

Usage: /here

(back to top)

Getting Started

Lunchbot first needs to be added to the workspace by the workspace admin, and then to any Slack channels you want to be able to use it in.

The app isn't yet available on the Slack App Directory - so you'll need to self-host in. Lunchbot is a Node.js app using the Bolt for JavaScript SDK, and relies on a MongoDB database for storing installation data.

Setup

  1. Create a MongoDB database (you can create a free-tier database on Atlas)
  2. Create a new Slack app here.
    1. Make sure to select 'From an app manifest' when creating the app
    2. Choose the workspace you'd like to install the app in
    3. Paste the contents of lunchbot-manifest.yml into the box when asked
    4. Under Basic Information, create a new App-Level Token, and make sure to give it the connections:write scope. Copy down the token.
    5. Under OAuth and Permissions, click Add New Redirect URL, and enter the URL of your app, followed by /slack/oauth_redirect, like so:
      https://lunchbot.example.com/slack/oauth_redirect
      
    6. (Optional) Under Basic Information, upload an app icon for Lunchbot (you can use lunchbot-icon.png if you like)
  3. Either set these environment variables up in your hosting platform of choice, or fill in them in the .env file in the root of the project (don't commit it to public source control...).
    SLACK_APP_URL=<the HTTPS URL of the hosted app (don't include / at the end)>
    SLACK_APP_TOKEN=<the app-level token you copied down earlier>
    SLACK_CLIENT_ID=<find this under Basic Information > App Credentials>
    SLACK_CLIENT_SECRET=<find this under Basic Information > App Credentials>
    MONGO_CONN_STRING=<connection information for the MongoDB database, include username and password, see https://www.mongodb.com/docs/manual/reference/connection-string/#std-label-connections-dns-seedlist>
  4. With the app running, visit the install URL for the app, like so
    https://lunchbot.example.com/slack/install
    
    and follow the instructions to install the Slack app in the workspace.
  5. Lunchbot is now available in your workspace. In channels that you want to use it in, send it an invite using /invite @Lunchbot.
  6. Run some commands!

The first time a user executes a command, they'll be asked to authorise Lunchbot by going through the OAuth flow.

(back to top)

Roadmap - updated 11/06/2022

  • Better error handling
  • Better logging setup
  • Create app manifest for easier setup

(back to top)

Contact

Ben Tomsett - @benjitomsett

GitHub: https://github.com/bentomsett/lunchbot

(back to top)

lunchbot's People

Contributors

bentomsett avatar dependabot[bot] avatar

Watchers

 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.