Teunis WoordSoftware Developer

Project 02 · Personal

Ledger
Discord Bot

A modular Discord bot for practical server utilities, built on modern slash commands, with per-server data kept in SQLite.

Year
2024
Type
Discord bot
Status
Personal project
Interface
Slash commands
Screenshot of the Ledger Discord Bot
Ledger running in a Discord server.

01 Context

Ledger is a modular Discord bot focused on practical server utilities and lightweight interaction. It's built in Python with discord.py and uses modern slash commands throughout for clarity and discoverability. A persistent SQLite database holds server-specific configuration and content (saved quotes, timezone preferences and daily-game state) and the modular architecture means new features can be added without disturbing existing ones.

02 Capabilities

  • Persistent server storage: per-server data such as quotes and timezone settings stored reliably in SQLite.
  • Quote management: save, retrieve, search, list and delete server quotes through slash commands.
  • Timezone handling: server-configurable timezones with automatic daylight-saving handling and a global overview.
  • Daily posts: automated daily quote posts with optional countdowns to upcoming events.
  • Word games: Wordle and Linkle playable in Discord, with persistent per-user daily state.
  • Utilities & fun: practical commands (ping, uptime, server info) alongside lightweight extras.

03 Command reference

Quotes
CommandDescription
/quote_add [quote]Saves a new quote to the server database.
/quote_randomReturns a random stored quote.
/quote_listDisplays the most recently added quotes.
/quote_search [text]Searches quotes containing specific keywords.
/quote_delete [id]Deletes a quote by its ID.
Timezone
CommandDescription
/timezone_set [tz]Sets the server's primary timezone, with autocomplete and common abbreviations (CET, UTC).
/timezoneShows the current server time with a curated list of global timezones.
Daily posts
CommandDescription
/gandhi_startStarts daily quote posts in the current channel at 14:00 UTC.
/gandhi_stopStops daily quote posts for the server.
/countdown start [reason] [date]Adds a daily countdown to a date alongside the post.
/countdown stopStops the active countdown.
Games
CommandDescription
/wordlePlay today's Wordle: six tries, state persists per user per day.
/wordle_resetResets your Wordle progress for today.
/linklePlay today's Linkle: find the hidden word from compound-word clues.
Utility & fun
CommandDescription
/pingChecks the bot's current latency.
/uptimeDisplays how long the bot has been running.
/serverinfoShows 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).
/coinflipFlips a virtual coin.
/choose [options]Chooses randomly from multiple options.
/rate [thing]Rates something on a scale from 1 to 10.
/8ball [question]Returns a randomised Magic 8-Ball response.

04 Stack

Python discord.py SQLite python-dotenv ZoneInfo
Back to index