The NoSlackCats bot is a Python-based Slack bot that identifies cat images shared in a Slack channel using the Clarifai gPRC API.
This Slack Bolt app will handle the file_shared
and message
event or parse a message for an image URL.
- Python 3.6 or later
- Slack Bolt Framework, API key, Signing secret and OAuth scopes
- Clarifai API key and permissions
- chat.write
- channels.read
- im.history
- files.read
- (others)
- Clone the repository to your local machine.
- Install the required dependencies using pip install -r requirements.txt.
- Set up your Slack app and obtain your Slack API key and OAuth scopes.
- Set up your Clarifai account and obtain your Clarifai API key and permissions.
- Set your API keys and tokens in a .env file.
- Run the bot using the command python app.py.
- NoSlackCats will automatically listen for files shared in the Slack channel where it has been installed.
- If an image is detected, the bot will reply to the message with a message indicating that the image is a cat.
- We could obviously do more here - preferably deleting the image - but this is a proof of concept... 😉
Contributions to the NoSlackCat bot are welcome! To contribute, please follow these steps:
- Fork the repository.
- Create a new branch for your changes.
- Make your changes and test them locally.
- Create a pull request on the main repository.
License The NoSlackCat bot is released under the Apache 2.0 License. See the LICENSE file for more information.