development
main
This PR contains a major refactor of the Pterodactyl Discord Bot from a monolithic pterodisbot.py into a modular structure with 10 separate modules.
pterodisbot.py
Modular Refactor
config.py
api.py
models.py
metrics.py
embeds.py
views.py
bot.py
main.py
logging_config.py
exceptions.py
CI/CD Updates
.gitea/workflows/ci-cd.yml
Config Generation
generate_config.py
Docker Updates
dockerfile
entrypoint.sh
Dependencies
pydantic>=2.14.1
requirements.txt
Tests
No dependencies set.
The note is not visible to the blocked user.
Summary
This PR contains a major refactor of the Pterodactyl Discord Bot from a monolithic
pterodisbot.pyinto a modular structure with 10 separate modules.Changes
Modular Refactor
pterodisbot.py(1586 lines) into 10 modules:config.py- Configuration management with Pelican Panel support (pacc_/papp_ prefixes)api.py- PanelAPI client for Pterodactyl/Pelicanmodels.py- Pydantic data models (requires pydantic>=2.14.1)metrics.py- Server metrics tracking and graph generationembeds.py- Discord embed lifecycle managementviews.py- Discord UI components (buttons, dropdowns)bot.py- Main bot class, commands, eventsmain.py- New entry pointlogging_config.py- Logging configurationexceptions.py- Custom exception classesCI/CD Updates
.gitea/workflows/ci-cd.ymlwith new module targets for coverage, linting (flake8, pylint, black, isort, mypy), security scanningConfig Generation
generate_config.pywith smart logic:Docker Updates
dockerfileto use Python 3.12, new entry point viaentrypoint.shentrypoint.shruns config generation then starts bot viamain.pyDependencies
pydantic>=2.14.1torequirements.txtTests
Testing