https://github.com/ky28059/guava-bot-slack
Slack bot for a certain elusive slack workspace.
https://github.com/ky28059/guava-bot-slack
Last synced: 3 months ago
JSON representation
Slack bot for a certain elusive slack workspace.
- Host: GitHub
- URL: https://github.com/ky28059/guava-bot-slack
- Owner: ky28059
- Created: 2022-01-12T01:29:30.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-30T21:58:32.000Z (about 1 year ago)
- Last Synced: 2024-03-30T22:32:16.188Z (about 1 year ago)
- Language: TypeScript
- Size: 197 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# guava bot slack
Slack bot for a certain elusive slack workspace.To run locally, create a `config.ts` in the root directory which exports your slack signing secret, bot user token, port,
and signup spreadsheet id:
```ts
// config.ts
export const signingSecret = 'legitimate-slack-signing-secret';
export const token = 'xoxb-also-legitimate-slack-token';
export const port = 3000;export const spreadsheetId = 'secret-sheets-id';
```
Install dependencies with `npm install` and run `npm start` to run the bot.### Slack
When creating the Slack application, note that boltjs requires that all URLs are appended with `/slack/events`. If your
server is running at `13.00.255.255` on port `3000`, set the event subscription URL and request URL for all created slash
commands to be `http://13.00.255.255:3000/slack/events`.Guava bot requires the following scopes:
- `commands` to add and receive slash command interactions
- `chat:write` to send messages
- `users:read` to extract `user.real_name` from `command.user_id`
- `reactions:read` to receive `reaction_add` events
To use the sheets API, create a [Google cloud project](https://console.cloud.google.com) and enable the [Google Sheets
API](https://console.cloud.google.com/marketplace/product/google/sheets.googleapis.com). Create a service account via
`Create Credentials > Google Sheets API > Application data`. In your service account details page, save your key file
(`Keys > Add Key > Create new key > JSON`) as `keys.json`.
Make sure whatever spreadsheet you're using as the linked signup spreadsheet is shared with your service account.