The Discord half of Door Counter v3. The sensor above the UPL door keeps count.json up to date, this bot reads it and tells the server.
/who tells you who and how many people are in the UPL right now. Responses come with a randomized activity: people may be programming, toiling, hobnobbing, or if it's just one person, being a sigma lone wolf. The verb lists are at the top of bot.py, feel free to add more lol.
The bot also sets its Discord status to the live count every minute (~N people / empty / offline), so most of the time you don't even have to ask. If the counter service dies, /who says so and tells you to poke someone.
/coord tells you if someone has their office hours and if they are present for their office hours. It will figure out the current time,
and pull from the schedule in the json file. If no one is currently scheduled, it will tell you the next scheduled office hours.
Lives on the same Pi as the counter. It reads count.json straight off disk and checks the systemd service before answering.
pip install -r requirements.txt
python bot.pyWith a .env:
DISCORD_TOKEN=your bot token
GUILD_ID=your server id
COUNT_JSON_PATH=/path/to/door-counter-v3/data/count.json





