Due I'm leaving my current company, and I really like some of my colleagues, I came up with the idea of setting a bot, which send them some of ours jokes and add some interactions in case they reply to the bot.
You only need a file with all the sentences that you can to send to a list of users (check /text/example.yaml
)
This is the format that you have to write your own .yaml to be able to run Alterego
Execute python alterego.py
and it will start
This project has been developed to run in Kubernetes, together with helm. As database we use a MongoDB to store the data.
We can identify clearly two parts:
- Get all the data from slack
- Store the data in Mongodb
- Read the text that we want to send
- Store the data in Mongodb
- Combine the Slack data with our text
- Store the result in Mongodb
- Query Mongodb and get one sentence
- If the user already wrote to us, add an reaction
- Send the message
Important: To avoid send all the messages in consecutives days, sending the messages is random.