88** \* Note** : I am not affiliated with or endorsed by Piazza or Slack in any way. Neither
99is this bot.
1010
11- ## Installation (adding to your workspace, and updates)
12- This app isn't registered through the slack app directory. For now, it's meant
13- to be used by one workspace per install/instance. To add to your workspace,
14- we need to do two things:
15- 1 . Register a new app in your workspace, and add the appropriate permissions.
16- 2 . Set the app up on your host.
17- 3 . Once PiazzaBot is up and running, add it to any channel you want to use in.
18-
19- ### Register the app (3-5 min)
20- 1 . _ [ Register a new app] ( https://api.slack.com/apps?new_app=1 ) for your
21- workspace._ Open that link (in a new window/tab). Choose to register the app
22- from manifest, then copy & paste everything from the ` slack-manifest.json `
23- file in this repo into the window (make sure it's the ` json ` window and not
24- the ` yaml ` window). Click through and confirm the app. This should take you
25- to the "basic information" settings page.
26- 2 . _ Install to workspace._ Click the install to workspace button.
27- 3 . _ Add the piazza icon._ From the "basic information" page, at the bottom
28- under "display information", upload the icon from this repo as the app icon.
29- 4 . _ Generate and save App-Level Token._ Under "App Level Tokens", generate a
30- token with read/write authorizations. Note the token, as we'll need it to set
31- the app up on your host.
32- 5 . _ save bot token._ Finally, note the bot token. In the left-side nav, click
33- into "Features"->"Oauth & Permissions", and note the Bot User OAuth Token.
34-
35- ### Host the app (3-5 min)
36-
37- 1 . _ Clone this repo._ This is the easiest way to handle updates, since you
38- can just pull from ` main ` and restart the app whenever there's an update.
39- Alternatively, if you need to modify the app for your workspace, fork instead.
40- 2 . _ Install dependencies._ Set up a virtual environment, and install the
41- required modules from ` requirements.txt ` . There's an install script ` install.sh `
42- which contains the commands you'll need to run. Either run each command
43- individually, or try running the script ** make sure python3 is installed on
44- your system before running** .
45- 3 . _ Add tokens._ create a ` .env ` file from ` .env-sample ` and add the
46- corresponding tokens you noted when registering the app.
47- 4 . _ Add Course ID._ Go to your course's dashboard (if you're viewing a question,
48- click the logo). add the long alphanumeric string to your ` .env ` as the ` COURSE_ID ` .
49- 5 . create new directory ` data/ ` and a blank file ` db.json ` inside of it.
50- 6 . _ Run the app._ Run the app! ` python app.py `
11+ ## Installation
12+ PiazzaBot now supports multiple workspaces, so installation is very straightforward. Just click the button above.
5113
5214## Contributing
5315Still thinking about the ideal workflow, however I'd like to keep PM on
@@ -61,11 +23,3 @@ for more.
6123## Development
6224PiazzaBot is built using [ Slack's Bolt framework] ( https://github.com/SlackAPI/bolt-python ) .
6325As such, most developer documentation can be found there.
64-
65- Because the app uses socket mode, it isn't really possible to have multiple
66- developers working on the bot in the same workspace. So, the best way to set
67- up this app for local development is to:
68- 1 . create a test workspace (so changes don't interrupt a real workspace)
69- 2 . Follow the installation instructions above, but register the app to that
70- workspace instead. Thanks to socket mode, you can run the app on your computer
71- and it will work in that test workspace!
0 commit comments