Automates administrative and managerial tasks on Princeton EBCAO Discords.
The project uses ruff, ty, and pre-commit for linting, formatting,
type-checking, and code consistency checks. You can install all of
these tools using uv tool install and run them on the project
where the respective tool configurations are stored in the
pyproject.toml.
Setup the virtual environment:
uv venvSetup pre-commit:
pre-commit autoupdate
pre-commit install
pre-commit run -aIn the root directory, run:
mkdir build logs data assignments messagesuv run src/marshmallow- /info member
Developed to quickly retrieve username, nickname, display name, and roles.
Note
It helps diagnose whether discord.py is properly detecting members’ various aliases, which is integral for the bot's name-matching algorithm.
- /clone_role role new_role_name
Instead of creating a new role and tediously updating permissions, clone an existing role with similar or the same permissions and modify accordingly.
Note
Discord does not have a UI method for duplicating roles, so this command was implemented.
- /peep
This is a marshmallow thematic rendition of the idiomatic /ping command to check whether the bot is responding.
- /about
This is just for the curious.
- /sync
Updates Marshmallow’s registered slash commands and documentation.
- /*load cog_name
This allows bot code to be dynamically updated, added, or removed without taking down the bot.
- /clone_roles role base_name start end
Make Zee Group 9 to 14 roles.
- /clone_channels channel base_name start end
Make zee-group-9 to 14 channels.
Note
The commands above are useful for creating channels and roles with the same permissions in bulk.
- /delete_roles base_name
Remove all roles with “Spring Mentorship” in its name.