01 Context
Ledger is a Discord bot I wrote in Python with discord.py. Everything
works through slash commands, so you can see what it can do just by typing a /.
Each server gets its own data in a SQLite database: saved quotes, its timezone, and
how far everyone got in today's games. Every feature is a separate module, so I can
add something new without breaking the rest.
02 What it does
- Quotes: save, find, list and delete quotes from the server.
- Timezones: set a timezone for the server and see the time in other places. Daylight saving is handled for you.
- Daily posts: a quote every day, with an optional countdown to a date.
- Word games: Wordle and Linkle inside Discord. Your progress for the day is saved.
- Small stuff: ping, uptime, server info, dice, a coin flip and an 8-ball.
03 Command reference
Quotes
| Command | Description |
/quote_add [quote] | Saves a new quote to the server database. |
/quote_random | Returns a random stored quote. |
/quote_list | Displays the most recently added quotes. |
/quote_search [text] | Searches quotes containing specific keywords. |
/quote_delete [id] | Deletes a quote by its ID. |
Timezone
| Command | Description |
/timezone_set [tz] | Sets the server's primary timezone, with autocomplete and common abbreviations (CET, UTC). |
/timezone | Shows the server time next to a list of other timezones. |
Daily posts
| Command | Description |
/gandhi_start | Starts daily quote posts in the current channel at 14:00 UTC. |
/gandhi_stop | Stops daily quote posts for the server. |
/countdown start [reason] [date] | Adds a daily countdown to a date alongside the post. |
/countdown stop | Stops the active countdown. |
Games
| Command | Description |
/wordle | Play today's Wordle: six tries, state persists per user per day. |
/wordle_reset | Resets your Wordle progress for today. |
/linkle | Play today's Linkle: find the hidden word from compound-word clues. |
Utility & fun
| Command | Description |
/ping | Checks the bot's current latency. |
/uptime | Displays how long the bot has been running. |
/serverinfo | Shows basic information about the server. |
/userinfo [user] | Displays account and server information about a user. |
/roll [NdM] | Rolls dice using NdM notation (e.g. 2d6, 1d20). |
/coinflip | Flips a virtual coin. |
/choose [options] | Chooses randomly from multiple options. |
/rate [thing] | Rates something on a scale from 1 to 10. |
/8ball [question] | Gives a random Magic 8-Ball answer. |
04 Stack
Python
discord.py
SQLite
python-dotenv
ZoneInfo
← Back to index