My student dormitory has three laundry rooms with two washing machines and two tumble dryers each. We wanted to organise access to the machines.1
The landlady would not allow us to install equipment to automatically determine the machine status, so people have to manually enter machine starts into the system. Because most tenants are in the dormitory group chat on Telegram (a terrible group with about 200 members), I programmed a Telegram bot so that people could use an app they already had on their phones and knew how to use.
Users can start a machine, set a time, and the bot will send them a message once the machine has finished.
The bot is programmed in Python, using the
I had a few problems with the package, mostly a) that it seems to be incredibly complex for what I wanted to do (and I could never find what I was looking for in the docs), and b) that the connection handling feels a bit shaky (a lot of timeouts in the logs, complaints from users that the bot is not responding fast enough).
However, my code is absolutely horrible and it is very possible that both of these problems come from me not understanding the package well enough and programming like a drunken monkey. If this would have been a serious project and not the rushed weekend timesink that it was, I would have applied more thought and engineering technique to it all and would have more confidence in that and how it works. If I touch this project again, I pinky-promise to generously massage a lot of refactoring into that code before I start to work on any new features.
Read: I wanted to play around with Telegram bots instead of studying. ↩︎