Flurazide is a feature-rich, multi-purpose Discord bot designed to enhance community engagement through a robust economy system, advanced image manipulation, and comprehensive moderation tools. Built with discord.py, it offers a seamless experience for both administrators and users.
- About / Overview
- Features
- Screenshots / Demo
- Installation
- Deployment
- Usage
- Configuration
- Project Structure
- Roadmap
- Contributing
- Testing
- FAQ
- License
- Acknowledgements
Flurazide exists to provide a "one-stop shop" for Discord server utility and entertainment. Its core philosophy is to blend complex database-driven functions (like a persistent economy and automated backups) with lighthearted, high-quality fun commands. Whether you're looking to moderate your server, simulate a virtual economy, or create memes on the fly, Flurazide is built to handle it with style and efficiency.
- Forced GIFs: Convert static images or links into GIF format for easy sharing.
- Dynamic Captions: Add impact-font captions to the top or bottom of images and GIFs.
- Artifacting: Apply recursive JPEG artifacting for that "fried" look.
- Profile Tools: Easily grab high-resolution avatars and banners from users.
- Persistent Currency: Earn, spend, and trade virtual currency across commands.
- Virtual Shop: Purchase the set of items available in the store.
- Casino Games: Test your luck with virtual betting (no real money involved).
- Automated Sanctions: Efficiently manage bans, kicks, and message clearing.
- Case System: Full moderation case management with search, edit, and pagination.
- Backup System: Automated database backups to Google Drive via service account integration.
- Server Metrics: Detailed
/serverinfoand/infocommands for deep insights.
- Interactive Games: 8-ball, dice rolling with advanced expression support (
/roll 1d20+5), and simulated "hacks". - External APIs: Integration with PokΓ©API, XKCD, random cat/dog image providers and so much more.
- Utilities: Currency exchange, height conversion, Urban Dictionary lookup, and Base64 encoding.
- Python 3.10 or higher
- A Discord Bot Token (via Discord Developer Portal)
- (Optional) Google Cloud Service Account for backups
-
Clone the repository:
git clone https://github.com/ThatOneFBIAgent/Flurazida.git cd Flurazida -
Install dependencies:
pip install -r requirements.txt
-
Run the initialization helper:
python startbot.py
Follow the interactive prompts to set up your environment.
-
Start the bot:
python src/main.py
The Dockerfile uses a multi-stage build to keep the final image slim and reduce memory consumption:
- Build the image:
docker build -t flurazide-bot . - Run the container: (Ensure your
.envfile is in the current directory)docker run --env-file .env flurazide-bot
RAM Note: The optimized Dockerfile separates build-time dependencies (compilers, dev headers) from runtime, resulting in a significantly smaller image with lower memory footprint.
Deploying to Railway is streamlined via the included Dockerfile and Procfile:
- Connect Repository: Link your GitHub repo to a new Railway project.
- Detection: Railway will automatically detect the
Dockerfile. - Environment: Add your
BOT_TOKENand other.envvariables in the Railway dashboard. - Service Process: If prompted, ensure the service is set to use the
workerprocess defined in theProcfile.
/ping: Check bot latency and Cloudflare RTT./help: Opens a paginated menu of all available commands./roll dice: 2d20+5: Advanced dice roller with expansion support.
/image caption caption: "When the bot works" image: [Upload]: Captions an image./image jpegify recursions: 5: Crushes an image with artifacts.
/moderator ban target: @User reason: "Violation of rules": Bans a user.
Create a .env file (or use the .env/ directory) with the following:
| Variable | Description |
|---|---|
BOT_TOKEN |
Your Discord Bot Token (Required) |
DRIVE_TOKEN_B64 |
Base64 encoded Google Drive token (Optional for backups) |
Modify extraconfig.py for advanced settings:
BOT_OWNER: Your Discord User ID.BACKUP_FOLDER_ID: Google Drive folder ID for automated database backups.FORBIDDEN_GUILDS/FORBIDDEN_USERS: Blacklist management.
Flurazide/
βββ bot.py # Minimal entry point (signals & startup)
βββ main.py # Bot class & setup hook
βββ commands/ # Bot command cogs
β βββ economy.py # Currency & Shop
β βββ fun.py # Games & APIs
β βββ gambling.py # Casino games
β βββ image.py # PIL processing
β βββ moderator.py # Admin tools
β βββ shop.py # Shop system
βββ data/ # SQLite databases (auto-created)
βββ utils/ # Helper functions
βββ database/ # Database management module
β βββ manager.py # All DB operations and backups
β βββ items.py # Shop items definition and effects list
βββ logging_modules/ # Custom logging system
β βββ custom_logger.py # Environment-aware logging
βββ services/ # External service integrations
β βββ cloudflare_ping.py # Cloudflare latency checker
βββ tests/ # Pytest suite
β βββ test_database.py # Economy, shop, items, moderation tests
βββ config.py # Core configuration & cooldowns
βββ extraconfig.py # Advanced settings & secrets
βββ resources/ # Assets (Fonts, etc.)
βββ requirements.txt # Dependencies
βββ dockerfile # Multi-stage Docker build
βββ Procfile # Railway process definition
βββ pyproject.toml # Pytest configuration
βββ LICENSE # AGPLv3 License
- Phase 0: Clean up codebase, modular architecture, add tests.
- Phase 1: Higher efficiency image manipulation.
- Phase 2: Migration from SQLite to MySQL for better scalability.
- Phase 3: Website dashboard for configurations.
- Phase 4: Localization support.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/AmazingFeature). - Commit your changes (
git commit -m 'Add AmazingFeature'). - Push to the branch (
git push origin feature/AmazingFeature). - Open a Pull Request.
Standards: Refer to PEP 8 for coding style expectations.
Flurazide includes a full Pytest suite. To run the tests:
python -m pytest tests/ -vTests cover:
- Economy operations: Balance updates, debt floor clamping, user creation.
- Shop system: Item purchasing, insufficient funds, inventory management.
- Item effects (
use_item): Use decrementing, last-use removal, robbery/defense modifiers, all 11 shop items. - Gun defense: Gun check, use decrement.
- Moderation: Case insert/get/edit/delete, per-guild numbering.
All 29 tests are passing. Configuration is in
pyproject.tomlwithasyncio_mode = "auto".
Q: Can I use this for real-money gambling? A: No. All economy features are purely virtual and for entertainment purposes only.
Q: Why do image commands take a few seconds? A: Large images or GIFs are processed locally using PIL and may be temporarily uploaded to catbox for it's high size. High-recursion JPEG artifacting is CPU-intensive.
This project is licensed under the GNU Affero General Public License v3.0. See the LICENSE file for details.


