Skip to content

Python rewrite with charts and slash commands - #16

Merged
buzzkillb merged 43 commits into
mainfrom
v2
Apr 20, 2026
Merged

Python rewrite with charts and slash commands#16
buzzkillb merged 43 commits into
mainfrom
v2

Fix lint errors in database.py

3f769a2
Select commit
Loading
Failed to load commit list.
GitzillaBot / gitzilla succeeded Apr 20, 2026 in 3m 7s

Gitzilla review complete

1 issue found.

This pull request performs a complete rewrite of the RustyMcPriceface Discord bot from Rust to Python. The new implementation replaces the Rust backend with Python services using discord.py for the bot, asyncpg for PostgreSQL database operations, matplotlib for chart generation, and aiohttp for price fetching from Pyth Network. The bot now supports Discord slash commands (/price current and /chart price) with price charts featuring high/low markers, percentage changes, and cryptocurrency conversions. Configuration has been updated to use PostgreSQL instead of SQLite, and Docker Compose has been modified to include a PostgreSQL service alongside the bot container. The CI/CD workflow has been rewritten from Rust cargo tests to Python linting with ruff and Docker smoke tests.
Based on my analysis of this complete rewrite PR, the significant runtime defects have already been identified in earlier review comments. This PR replaces the Rust implementation with Python using discord.py for slash commands, PostgreSQL for persistence, and matplotlib for chart generation. The main infrastructure changes include switching from SQLite to PostgreSQL with docker-compose, adding Discord slash commands for price and chart queries, and introducing a new chart service for visual price history display. The Python implementation maintains similar data flow patterns to the Rust version with periodic price updates, presence updates, and database-backed price history.

Details

  1. [HIGH] Hardcoded database password in .env.example
    Location: .env.example:14
    The .env.example file contains a hardcoded database password (PdefSMMIa8N22nKwHxmWz5znC13bUFo) instead of a placeholder value. While the comment says "CHANGE THESE PASSWORDS", having actual credentials in the repository creates a security risk - the password will remain in git history and users may deploy with the real credential.
    Suggested fix: Replace the hardcoded password with a placeholder like your_secure_password_here and update the comment to make it clear this must be changed before deployment.