Like plusplus.chat, except this one actually works - because you can host it yourself! 😉
As PlusPlus++ says:
Plus, minus, and keep score of all the good and not so good things your friends say and do on Slack.
It's as simple as writing in Slack:
@Tim++ for being awesome!
Or:
@Cheeseburgers++
Or:
@CoffeeShop-- for forgetting my order ;(
Working PlusPlus++ will keep track of the score everyone (and everything) is sitting on.
Completely open source, so do with it what you like. Or if you don't want to make your own tweaks, deploy it as-is right now with the instructions below. You need somewhere to host it: Heroku is highly recommended because it's free in most cases, and performs super well.
-
Create a new app in your Slack team.
You can do this from the Slack API Apps page. You'll need permission to add new apps, which depending on your team settings might require an admin to do it for you.
-
Add a bot user for your app.
This can be done under Bot Users in the menu on the left. You can name it whatever you like, and for best results, select it to always show as online.
This allows the app to speak back to your team when they ++ and -- things.
-
Add chat permissions, and install the app.
Under OAuth & Permissions, scroll down to Scopes and add the
chat:write:bot
permission. Click Save Changes.You can now install the app. Scroll back up, click Install App to Workspace, and follow the prompts.
-
Copy your tokens.
From the same OAuth & Permissions page, copy the Bot User OAuth Access Token (not the non-bot token!) and store it somewhere.
Go back to the Basic Information page, scroll down, and copy the Verification Token too.
-
Deploy the app somewhere.
Heroku is recommended because it's simple and easy, and on most Slack teams this should not cost you a cent.
If you need to sign up first, do so, then come back here and click the Deploy button again.
Find out more about Heroku here or here, and Heroku Postgres here or here.
To increase the free hours available to your account you may need to add a credit card. The hours used by the app will vary depending on the activity on your Slack account, but it won't cost you anything unless you upgrade your plan to support increased scale (or unless you have other Heroku apps using your hours!). The Postgres addon (for storing the scores) is also free for up to 10,000 rows (that's 10,000 unique users or things that your team can ++ or --).
Hosting somewhere other than Heroku is fine too. See Detailed Instructions below.
-
Back at Slack apps, switch on Event Subscriptions for your app.
Via Event Subscriptions in the left menu. After switching on, enter your new Heroku app address - eg.
https://my-plusplus.herokuapp.com
- as the request URL.Scroll down and, under Subscribe to Bot Events, add the
message.channels
andmessage.groups
events, then click Save Changes. -
Invite your new bot to any channel in your Slack team.
-
Think of someone who's been awesome lately and send
@Someone++
!
Further instructions, such as hosting elsewhere, upgrading, etc. are coming soon.
Contributions are welcome! Create an issue if there's something you'd like to see or send a pull request if you can implement it yourself.
To develop locally, follow most of the Installation instructions above, except rather than deploying to Heroku, clone this repo locally and then install dependencies:
git clone https://github.com/tdmalone/working-plusplus
cd working-plusplus
yarn
You'll need Node.js already installed on your system. In addition, if you don't have Yarn and don't want it, you can use npm install
instead of yarn
above (but you might not get exactly the same dependencies).
After installing, to run the app:
node index.js
Or if you have the Heroku CLI installed:
heroku local
If you make changes, press Ctrl+C to exit, and then run the app again to launch with your changes.
For the most part, you'll need to be able to have Slack contact your development instance directly. If you don't have the ability to forward a port through to your machine, I recommend ngrok. Download and extract, then in the directory you've extracted it in run:
./ngrok http 80 # Or port 5000 if you're running with heroku local.
Further details are coming soon.
Although it works, it's very basic. Enhancements include:
- Add tests
- Add a leaderboard
- Add the ability to customise the messages the bot sends back
- Move to the newer, more secure method of calculating signatures for incoming Slack hooks
MIT.