Gavin JuddIndex

Build notes · 2 min read · October 2026

Build notes: KyberDex

I had a Raspberry Pi 5 running and wanted a way better version of a card bot I'd seen.

KyberDex is a self-hosted Discord bot for collecting and battling Star Wars cards, built for a Star Wars community I’m part of. It runs on the Raspberry Pi 5 in the photo on my home page.

Why

I’d just taken a close look at an existing card bot and already had a Pi 5 running. I basically wanted to build a way better version, one that a server could just run on its own hardware.

What’s in it

  • 851 cards, with raids, crafting, and separate ground and fleet battles.
  • Trades use two-sided escrow: nothing moves until both people confirm the exact version of the trade.
  • Card drops depend on real activity: someone has to have chatted in the last five minutes, so idle servers don’t farm drops.
  • Capture limits allow two collectors for Common through Epic and one for Legendary and Mythic, keeping rare cards rare.
  • Card images are rendered with fonts chosen by Type Evidence, my font toolkit.
  • A searchable web catalog that shows cards and no player data, plus integrity-checked backup and restore.

It uses Python, discord.py and SQLite.

One command

Setup is usually where people give up on a self-hosted bot, so I made the whole process one command. It asks for the bot token and server ID, then handles the rest, including downloading about 175 MB of card artwork on its own. The token stays hidden as you type, and you don’t need sudo. Version 0.3.0, “one-command bot setup,” shipped 30 minutes after 0.2.0.

Actually creating the Discord bot is the one step it still can’t handle for you, since that still needs a browser.

What went wrong

The Pi just randomly shut down partway through setup and wouldn’t turn back on, though it eventually came back. A test fixture was missing gzip, which caused CI on Linux to fail. And the Star Wars artwork can’t ship in the repo, so the installer downloads it.

Numbers

  • At release, 894 tests and 1,092 subtests passed.
  • The code is MIT licensed. The artwork isn’t mine and isn’t included.

Source: github.com/gavinjudd/kyberdex