Skip to content

About

Discord bot for the UPL door counter v3, /who tells you who's in the lab 🫆

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

27 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Detective

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.

/who response in Discord

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.

/coord response in Discord when UPL closed and no one is scheduled. /coord response in Discord when the UPL is open but no coord is scheduled. /coord response in Discord when the UPL is closed but a coord is scheduled. /coord response in Discord when the UPL is open and coord is scheduled.

Running it

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.py

With a .env:

DISCORD_TOKEN=your bot token
GUILD_ID=your server id
COUNT_JSON_PATH=/path/to/door-counter-v3/data/count.json

About

Discord bot for the UPL door counter v3, /who tells you who's in the lab 🫆

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages