Line 1: |
Line 1: |
| Snack Bot is a Slack Bot that incentives workspace cleaning by giving snacks to those who share proof of cleaning. You'll need to spend a few minutes tidying the workspace, then you can redeem a snack. Here are possible ways to fulfill the requirement: | | Snack Bot is a Slack Bot that incentives workspace cleaning by giving snacks to those who share proof of cleaning. You'll need to spend a few minutes tidying the workspace, then you can redeem a snack. Here are possible ways to fulfill the requirement: |
| | | |
− | === Cleaning options === | + | === Cleaning Ideas === |
| | | |
| * Put away tools left out on a table | | * Put away tools left out on a table |
Line 24: |
Line 24: |
| The expectation is that cleaning lasts at least 2 minutes, and makes a noticeable change to the workspace. Cleaning a mess you made does not count, and should benefit others in the club (i.e. not a box that only you use). | | The expectation is that cleaning lasts at least 2 minutes, and makes a noticeable change to the workspace. Cleaning a mess you made does not count, and should benefit others in the club (i.e. not a box that only you use). |
| | | |
− | For accountability, when you send a photo it gets uploaded to #snackbot-pics. Anyone is allowed to join this channel and see what others have cleaned. If someone believes a photo was taken without cleaning, it can be flagged with the :x: emoji, and it will be sent to the workspace managers for review. | + | For accountability, when you send a photo it gets uploaded to #snackbot-pics. Anyone is allowed to join this channel and see what others have cleaned. If someone believes a photo was taken without cleaning, it can be flagged with the :not-clean: emoji, and it will be sent to the workspace managers for review. |
| + | |
| + | == Workspace Managers == |
| + | Additional functionality is available to those in the #workspace-core private channel: |
| + | |
| + | === <code>/workspace-add-snack-credits</code> === |
| + | Adds snack credits to the users tagged in the slash command. Multiple users can be added with any or no delimiter. Add a number, 1-9, at the beginning or end of the command to specify the number of snack credits; it otherwise defaults to one. |
| + | |
| + | === <code>/workspace-unlock-snack-cabinet</code> === |
| + | Unlock the snack cabinet for 5 minutes. Intended to be used to restock the snack cabinet. |
| + | |
| + | === <code>/workspace-refresh-snack-credits</code> === |
| + | Resets all free snack credits to 2. Intended to be used at the start of the quarter. Snack credits granted through photo upload or /workspace-add-snack-credits are not affected by this. Free snack credits do not roll over if unused, though. |
| | | |
| == Technical == | | == Technical == |
− | The slack bot is run locally on a Raspberry Pi, using a Python script. Lawton maintains the Slack API access. When the button is pressed, a solenoid on the cooresponding . | + | The slack bot is run locally on a Raspberry Pi, using a Python script. Lawton maintains the Slack API access. When the button is pressed, a solenoid is actuated on the corresponding cabinet. |
| + | |
| + | An SQL database stores the snack credits. They are differentiated into two segments: free credits and earned credits. Free credits are used before earned credits, as free credits do not roll over. This is abstracted to the user with a single credit number. When a user invokes any command for the first time, they are added to the database with the free snacks. |
| | | |
− | The raspberry pi is set up to run the script upon booting, so it is resiliant against power outtage. | + | The Raspberry Pi is set up to run the script upon booting, so it is resilient against power outages. |