Since I have the ambition to create a sim game as a slack app, I wanted to first create something simpler.
The concept: the most simple tamagotchi ever; if you say ‘happy’ he’ll be happy, if you say ‘unhappy’ he’ll be unhappy. I got it working:
Things I learned:
- The core of how Slack commands work.
- Heroku is not the tool for this job. When there is very little trafic, a call to the server can take over 5 seconds to return something.
- I learned to make use of Python Anywhere. Enabling a free way to run this code.
- Made use of a WSGI file in order to get Python Anywhere working. I’m still not absolutely sure what the essence is of WSGI, other then that it tells the server how to run the code and act as a ‘middle man’ in some ways. But at least now I know that there is something I should probably know more about.
- Creating a simple JSON file is super simple in python.
It was tempting to add new features to the ‘gotchi’ app and try to figure out more about how Slack apps works. But I now know enough to start working on porting my sim game to become a slack app.