Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vulwsztyn/slack-reactions
https://github.com/vulwsztyn/slack-reactions
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/vulwsztyn/slack-reactions
- Owner: Vulwsztyn
- Created: 2024-09-03T15:29:42.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-06T15:30:25.000Z (4 months ago)
- Last Synced: 2024-09-06T18:36:34.391Z (4 months ago)
- Language: JavaScript
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# slack-reactions
![Example image](example.png)
## How to use
1. Get a token as instructed here https://stackoverflow.com/a/67795540/7195666
2. Create `.env` file with `TOKEN=your-token`
3. Add `ALPHABETS` to `.env` (see Prerequisites)
3. `npm install`
4. `node index.js `string: should be a string that appears in the message you want to react to and no later message.
## Prerequisites
This code assumes you have at least one emoji alphabet in your slack and that to distinguish between letter the letter is in the name of the emoji. Example formats: :whatever-alphabet-a: (a), :b-letter-3: (b), :asd-x-asd: (x).
You need to put the `ALPHABETS` in the `.env` file. This should be a comma separated list with `$` in place of the letter. For the example formats: `ALPHABETS=whatever-alphabet-$,$-letter-3,asd-$-asd`.
In order to be albe to react with "sentences" with more than `X` occurences of a letter, you need to have more than `X` alphabets, since the reaction cannot repeat.
### Random order of alphabets
By default the script will use the alphabets in the order they are in the `ALPHABETS` variable. If you want to use them in a random order, you can add `RANDOM=1` to the `.env` file.