This is an adaptation of WeAllJS's Wheelie Slack app.
The /mods command replaces /admin to keep in line with XOXO's terminology, and the bot's text has been updated for how XOXO's Slack instance uses private channels. XOXO does not use the signup part of the bot.
The original README is below:
Wheelie is a Slack App originally written for
WeAllJS. It takes care of various bits that a given slack
might need, such as an /admin
command, a signup request handler with request
review, slack statistics, and channel management.
Wheelie is a heroku app, so let's get that set up. A straightforward way is to clone this repo and go through the steps of adding a heroku remote and deploying to it.
Also, add the redis addon: heroku addons:create rediscloud:30
Wheelie is also a slack app! Go to https://<your slack>.slack.com/apps/build
, "Get Started with Slack Apps", then "Build an App". You're in the Slack App configuration section, let's set up Wheelie with the following:
In the Basic Information section of your slack app, get (and set in the
environment) SLACK_CLIENT_ID
, SLACK_CLIENT_SECRET
and VERIFICATION_TOKEN
(available after enabling Interactive Messages)
from the corresponding fields. That is, heroku config:set SLACK_CLIENT_ID=...client id...
Then, run heroku config:set APP_URL=https://<appname>.herokuapp.com
Next, you should add the app's redirect uri to the redirect field on that page.
The URI is: https://<appname>.herokuapp.com/oauth
Pick a valid name for your bot. Anything is fine.
Next, go to Interactive Messages and set https://<appname>.herokuapp.com/button
as the Request URL.
In the Slack Commands section, set up all the Wheelie commands as follows, using
https://<appname>.herokuapp.com/command
as the Request URL for all of them (the
same endpoint is shared across all commands).
/admin <message for admins> Notifies the admin channel.
/help? <nothing> Displays bot help.
/join-private <channel> Join a private channel.
/list-private [filter] List private channels.
Visit https://<appname>.herokuapp.com/install
and click the "Add to Slack" button.
Create two private channels: #admin
and #admin-signups
and invite your bot
into both of those. #admin
is where /admin
commands will go.
#admin-signups
is where web signups requests will go.
- Create a new slack user with the name and email you want Slack invites to be
sent with (for example,
MyCommunity Inviter <inviter@mycommunity.org>
). - Grant the user admin privileges
- Log in with the user on your browser (by visiting
<yourslack>.slack.com
) - Visit
https://<appname>.herokuapp.com/install-inviter?team=<team_id>
-- the URL will be displayed the first time you try to accept a user anyway.