HvZBot is a Discord bot that tracks the state of HvZ events at UC Davis. As of April 2023, it is actively maintained.
The database tracks:
Gameplay features:
State updates:
who
command reveals a player's name and publicly known role using their Discord tag.assign
allows mods to change a player's rolehide
/ 'expose' allow OZs to be added and exposed.tag
allows players themselves to tag themselves (selftagging is only used for Humans to change their roles when tagged) and each other.I use Heroku and MongoDB Altas (cloud-hosted noSQL database), to host the Davis HVZ bot. There are ample resources for making a Discord bot using these tools. When testing, I utilize .env to fetch the important keys (make sure this is never found on your GitHub repositories!).
The .env contains:
DISCORD_TOKEN=[found in the Discord Developer portal]
MONGODB_SRV=[found on the Atlas site]
PREFIX=[prefix your bot uses; my choice was "-"]
To start the bot all that is needeed to clone and type:
node main.js
For Heroku setup, only a worker dyno is required. They unfortunately no longer carry free dynos, so this will cost money. Hosting is fairly straightforward:
worker node main.js
dyno under Deploy.