Fluxer bot with prefix commands. It uses MongoDB database and fluxer.py Fluxer API wrapper.
Caution
I am porting this template from another template I had made for Discord bots using disnake.
It's still a major WIP and will be updated regularly with fluxer.py's development.
To use this template as your project starting point, click "Use this template" at the top of this page, or click here.
- Asynchronous support for files (via aiofiles), HTTP requests (via aiohttp), and MongoDB drivers (via motor & Beanie)
- Environment configuration with python-dotenv
- Logs via loguru
- Error handling
- Docker image build workflow to push images to Docker Hub or Github Container Registry
- Temporary file directory with scheduled clean-up
├── pyproject.toml
├── uv.lock
├── bot.py # The `MyBot` class
├── launcher.py # Entry point to launch the bot
├── .env # Environment variables for bot configuration (renamed from .env.template)
├── cogs
│ ├── admin.py # Commands for guild administrators
│ ├── commands.py # Example cog with some example prefix commands
│ ├── events.py # Fluxer event listeners
│ ├── owner.py # Commands for the bot owner only
│ └── tasks.py # fluxer.py scheduled background tasks
├── helpers
│ ├── __init__.py
│ └── embeds.py # Common Fluxer embed templates
├── models
│ ├── __init__.py
│ ├── guild.py # Example ODM model for guilds
│ └── settings.py # ODM model for global bot settings
├── utils
│ ├── __init__.py
│ └── utilities.py # General utilities
├── views
│ ├── __init__.py
│ └── paginator.py # Example view implementing embed pages
├── Dockerfile
├── README.md
├── DEVELOPMENT.md
└── LICENSE- Tests with pytest
- CI based on Github actions
- Dependabot configuration
- Instructions to create bot application with correct permissions
- Instructions or script to rename
MyBot/my-bot/my_botto something unique - Dockerfile
- Instructions to set up secrets in Github for GHCR or Docker Hub
- Add back an example workflow for Docker Hub
Contributors are welcome, please fork and send pull requests! If you find a bug or have any ideas on how to improve this project please submit an issue.
ruff is used for code formatting. Always format the code with ruff before submitting a pull request.
After cloning the repo, use uv to set up a virtual environment and install dependencies.
Inside the project root (directory containing this file), run:
uv syncAfter making edits, format using ruff:
uvx ruff check
uvx ruff formatTo execute tests with pytest:
uvx pytest