Overview
PiBot is a Discord bot that runs a mix of server games and small utilities, originally written for a specific group of servers. It stores per-guild data in a SQLite database and exposes its features through Discord slash commands and a legacy prefix command.
Features
- A collaborative “counting” game that tracks and enforces an incrementing count per server
- “O-chain”, a custom word/letter chain game with per-server toggles and stats
- A typing-speed test command that measures WPM and accuracy, with a leaderboard
- “Chopsticks” hand game implemented as a playable command
- Per-user and per-server alarms, stored in SQLite and checked on a background task loop
- A cafeteria menu lookup command scoped to a specific school’s Discord server
- Rickroll and circle-drawing novelty commands built with Pillow-generated images
- Runs in a Docker container, with environment-based configuration via
.env
How it works
The bot is built on discord.py’s commands.Bot with application-command groups (e.g. /counting, /ochain, /alarm) registered via app_commands.Group. Persistent state — counting progress, o-chain stats, typing results, alarms — is stored in a SQLite database using a thin wrapper around sqlite3, with a background tasks.loop handling time-based features like alarms. Image-based commands render output with Pillow before sending it back as an embed attachment.
