I run /addword with an English or Japanese word. Inflected Japanese input still finds the dictionary form.
2
A language model drafts the card
It turns the word into a structured vocabulary card.
3
I review it in Discord
Buttons let me add the card to a queue, edit it, regenerate it or cancel.
4
Export for Anki
/export turns the queue into a .tsv file, one per language, ready to import into AnkiDroid.
What I built
Commands
Slash and prefix commands for team assignment, a geography quiz, a suggestion board and reaction roles. Each one is a single file.
Web pages
A small Express server for the bot's own pages and their API, with rate limiting.
Deployment
GitHub Actions deploys to my VPS on every push to main and restarts the bot under PM2.
Choices I made
One file per command. Commands and events load automatically from their folders, so adding one means adding a file, with nothing to wire up by hand.
Swappable language models. Gemini and DeepSeek sit behind one interface and a setting picks between them, so switching models doesn't touch the commands.
SQLite for storage. Quiz results, suggestions and the vocabulary queue live in one local database, so there is no database server to run.
Tests where it gets tricky. Over a hundred Vitest tests cover the Japanese handling, validation, the database and the export.