Skip to content

ClimateTown/discord-bot

Repository files navigation

YouTube subs Patreon

All Contributors


This is the code that runs our friendly custom bot (their name is Spud) in the Climate Town Discord server!

Contributing

Contributions welcome! Suggest features for the bot by posting an issue, or by messaging in 🔨server-suggestion-box.

Note that bot feature suggestions are approved/dis-approved at the discretion of the moderators (aka. Comptrollers) of the server*.

If you want to contribute code, thank you! Head over to the issues section and find an issue you're interested in (voice your interest so other developers know what you're up to). Then go ahead and create your PR, get it reviewed, and merge it in!

* Note: Approved features will likely be in line with the limitations of the existing infrastructure. See the infrastructure section for more details on where the code is being run, and resources the machine has. If you have an amazing feature that would provide benefit to users, this may warrant us upgrading infrastructure to accommodate 😉.

Development setup

This repo uses Python and uv for dependency management.

  • Install uv if you haven't already
  • To set up the project, run:
    • uv venv (creates a virtual environment)
    • uv run ... to run a command in the uv environment

This codebase uses pre-commit and pre-commit CI to run linting on code, format Python code, and generally help with code quality. If you (optionally) want to run pre-commit locally, install it (e.g., via brew) then you can use the following commands:

  • pre-commit install to install the hooks
  • pre-commit uninstall to uninstall the hooks
  • pre-commit run --all-files to run pre-commit manually (without making a commit)

Adding Python dependencies

uv add pacakge_name

This will update your environment and the necessary config files with the new dependency.

Infrastructure

Currently the bot is running in a virtual machine (e2-micro, see the specs here) on Google Cloud Platform (GCP) as part of their free tier.

As such, we are keeping things to text interactions (no image/video processing), and no database for the time-being.

Note we will likely move to a greener platform if we exceed GCP's free tier. Let us know in 🔨server-suggestion-box if you have suggestions for cloud providers.

✨Contributors

Thanks go to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind are, again, welcome!

About

The Town Guardian bot used in the Climate Town Discord.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •