This is a fork of: tjansson60/pyslackrandomcoffee
A very simple random coffee bot for slack that takes all the members in a channel and randomly matches them up for a coffee date and writes the matches back in the same channel.
Could be called weekly or daily from a scheduler or manually. This version is intended to be deployed on AWS Lambda and triggered via API Gateway.
The bot will look back in the history of the channel and find past matches and use these to try to generate matches not seen before. By default, it looks back at the last 28 days of channel history.
The slack app RandomCoffees did the exact same thing, but is no longer available and the alternatives cost $$. So here is a simple solution:
First, set up a Python virtual environment and activate it:
python3 -m venv ovoslackrandomcoffee
source ovoslackrandomcoffee/bin/activate
You’ll need a Slack API token (see https://api.slack.com/apps/) set in the environment as SLACK_API_TOKEN with appropriate scopes such as:
channel:history
channels:read
chat:write
users:read
This bot is intended to be deployed to AWS Lambda and triggered via API Gateway.